Skip to main content
gamedev.net
🔒 Locked

Normal Dot Light

Started by HellRaiZer 0 replies 850+ views
Original Post
HellRaiZer
HellRaiZer
I''m trying to do something very simple...calculate the dot product between a normal map and a light direction. When i change the direction of the light the result doesn''t change. In TEXTURE0 i pass the normal map, CONSTANT_COLOR0 is the light direction, and PRIMARY_COLOR is the ambient light. I use 1 general combiner for the dot product. The sum between the dot product and the ambient light is done in the final combiner. What may be the problem???. Thanks in advance. HellRaiZer. Ps.If you need code to understand what i''m trying to do ,i''ll post it.
HellRaiZer
gunslinger77
gunslinger77
mumble mumble...

are u sure that u compute the DP3 between vectors expressed in the same space?
Usually normal maps are expressed in tangent space, while lights lay in the world space.
Lemme know if this helps..

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.