Original Post
Hello. I'm wondering why we have to multiply the Normal of a vertex ( expressed in objectd space ) by the "invert transpose World view matrix" ... Most of the sample which are using NVidia Cg language to do very simple lighting ( per-vertex directional lighting ) use the following pseudo code in order to transform input data to the correct space: =========== float4 WorldPos = mul( Input.Pos, WorldMatrix ); float3 WorldNormal = mul( Input.Normal, (float3x3) WorldViewIT ); =========== For me, with my very poor mathematics skill :) this pseudo code is mode "logic": =========== float4 WorldPos = mul( Input.Pos, WorldMatrix ); float3 WorldNormal = mul( Input.Normal, (float3x3)WorldMatrix ); =========== you transform the normal the same way you the position ( execpt that it's a vector and not a position ..) So, what's the mathematic tricks behind this normal transformation ??? Why do i have to use the WorldViewIT ( And Why Invert Transpose moreover !!!! ) instead of the simple world Matrix? Thanks a lot for your help !