flamz
09-06-2007, 12:29 PM
Hi,
I have a situation where I need to have the untransformed normal in the pixel shader. But only the transformed normal ( gl_NormalMatrix * gl_Normal ) is available to me. (to make a long story short: passing the untransform normal from the vertex shader to the pixel shader is not an option)
I'm a little confused about the matrix math needed to transform the eye normal back to world normal.
I've tried different things but can't seem to get it right.
I have a situation where I need to have the untransformed normal in the pixel shader. But only the transformed normal ( gl_NormalMatrix * gl_Normal ) is available to me. (to make a long story short: passing the untransform normal from the vertex shader to the pixel shader is not an option)
I'm a little confused about the matrix math needed to transform the eye normal back to world normal.
I've tried different things but can't seem to get it right.