• Create Account

### #Actualbelfegor

Posted 23 April 2013 - 10:00 AM

Normal is something like a "direction vector". usually when you want to transform direction vectors you need to set 'w' component to 0 so that translation part of transformation matrix isn't included into output. Position is, well position (point in space) and you set 1 to include translation part.

float3 normal = mul( float4( v.normal, 0.0f ), World ).xyz;
or
float3 normal = mul( v.normal, float3x3(World) );


### #1belfegor

Posted 23 April 2013 - 09:58 AM

Normal is something like a "direction vector". usually when you want to transform direction vectors you need to set 'w' component to 0 so that translation part of transformation matrix isn't included into output. Position is, well position (point in space) and you set 1 to include translation part.

PARTNERS