Acolyte of the Butterfly
Posts: 109 from 2013/12/5
at least on my Radeon 9000 setup normal-scaling doesn't work as expected.
It is the "other way around".
For example, to compensate a
I have to use normals of length 0.5 (1/2) when using TinyGL, instead of normals of length 2 as OpenGL would require.
Yes, at first you may think that I make a mistake here, but normals don't scale like vertex-coordinates in OpenGL (normal coordinates are transformed by the inverse
transpose of the transformation that transforms points!)
This is actually the "1st common OpenGL pitfall" :)Quote:
The other option is to adjust the normal vectors passed to OpenGL so that after the inverse transpose modelview transformation, the resulting normal will become a unit vector. For example, if the earlier glScalef call tripled the vertex coordinates, we could correct for this corresponding thirding effect on the transformed normals by pre-multiplying each normal component by 3.
Any chance this is going to be fixed?
Is this a driver or general TinyGL bug?
Daniel[ Editiert durch Daytona675x 24.03.2014 - 18:02 ]