•      Sign In
• Create Account

### #Actualinfact

Posted 31 May 2012 - 05:30 AM

Does the OpenGL fixed function pipeline compute lighting in view-space?

If the answer is yes, then how does it cope with view transformations with non-uniform scale? Actually, how does it cope with view transformations incorporating any scale at all?

If this is true then scaling the view space will result in different light-to-vertex distances, meaning the lighting intensity for point-lights will change as the view matrix is scaled.

Lighting in world-space would make the computed point-light intensity independent of view space scaling, but would require:
• That an object-to-world matrix is supplied to the API (such as in DirectX, where the light positions are specified in world-space).
• That the API transform all geometry twice when drawing. Once by world*view*proj into clip space, and again by world, in order to compute lighting at the vertices in world space.

I also posted this to stackoverflow, perhaps you want to answer it there too: http://stackoverflow...g-in-view-space

### #1dila_

Posted 31 May 2012 - 05:04 AM

Does the OpenGL fixed function pipeline compute lighting in view-space?

If the answer is yes, then how does it cope with view transformations with non-uniform scale? Actually, how does it cope with view transformations incorporating any scale at all?

If this is true then scaling the view space will result in different light-to-vertex distances, meaning the lighting intensity for point-lights will change as the view matrix is scaled.

Lighting in world-space would make the computed point-light intensity independent of view space scaling, but would require:
• That an object-to-world matrix is supplied to the API (such as in DirectX, where the light positions are specified in world-space).
• That the API transform all geometry twice when drawing. Once by world*view*proj into clip space, and again by world, in order to compute lighting at the vertices in world space.

I also posted this to stackoverflow, perhaps you want to answer it there too: http://stackoverflow.com/questions/10830759/does-the-opengl-fixed-function-pipeline-compute-lighting-in-view-space

PARTNERS