Ortho projection and directional light

I am having trouble with orthographic projection and directional light. Everything works as expected except the specular component.
For example if I have a light position (0, 0, 1, 0) (directional) My scene renders correctly but specular component lights the scene as if it is a positional light at (0, 0, 1) (again just for specular component). :confused:

My question is simply what am I doing wrong? or
Is there some gotcha with ortho and specular? (should go and read lighting theory again?) :frowning:

How are you doing the lighting? CG with H vector?

No fancy stuff :frowning:
Just fixed pipeline.

So you’ve got a nice setup for the combiners, I assume, and it works for point lights, but not directional? @_@ I need some coffee…

I really mean no fancy stuff. Just good ol` 1.1 (ok maybe 1.2). :stuck_out_tongue:

But for some code and pictures see

I suspect this is something related to GL_LIGHT_MODEL_LOCAL_VIEWER, but its been a long day. I guess, i have something to study for the weekend.

Ahhhhh, I see. Doing great lighting with 1.1 is difficult, especially specular lighting, without tesselating your geometry, alot. That maybe your only problem, subdivision.

Yes, i know but i have to support every possible card out there. :frowning:

To be more clear my problem is with image 2. I expect the front “wall” have specular too, but it does not as if the light is positional(image3).

I think I have meshed the “walls” quite good.

Note: I added a new picture (Image 4) showing the mesh I have.

You need to enable two sided lighting. Normally, you can only light the “positive” side, the side with the normal. I’d have to lookup the details on that, as I never use two sided lighting myself… I think maybe there’s a simple enable for that, not sure.

Oh yeah, plenty of tess there!


@@ Oops, you have the two side.
Hmmm, not sure I see the problem.

@@ make sure the model matrix is what you expect when you set the light position.