Hello Christian, On 07/28/2014 03:04 PM, Christian Bar wrote: > I managed to make the QuadTreeTerrain rendering work inside my application. > I changed the light position calculation inside the vertex shader. Now > it is: > > " vec3 LightPosition = gl_LightSource[0].position.xyz - > vec3(gl_ModelViewMatrix * gl_Vertex);\n" > > I'm not a shader expert, but to me now it seems to work...
hmm, that changes the lighting from a directional to a (sort of) point light. In the meantime I've noticed that my last change to the shader using gl_ModelViewMatrixInverse was wrong; the tangent space vectors are first transformed to eye-space, so the light direction can be left in eye-space as well. > If it's ok for you, can you commit this line, along with the > modification you did in the other patch? I've committed the other changes, but left the shader in its original form. I feel uneasy changing it without some understanding why that is the correct change. Cheers, Carsten ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users