dot3 bump mapping doubt

Started by
1 comment, last by LukeSkyRunner 21 years, 2 months ago
If my light vector and normalmap need to be a "RGB" format for normal direction how can I apply negative values to the normals?
Advertisement
The hardware biases the values by -127 (IIRC) inside the dot3 operation to turn them into *signed* values, so 0=-127 255=+127 or similar.

A quote from the SDK documentation for DOTPRODUCT3:

quote:...multitexture operations the above inputs are all shifted down by half (y = x - 0.5) before use to simulate signed data, and the scalar result is automatically clamped to positive values and replicated to all three output channels. Also, note that as a color operation this does not updated the alpha it just updates the rgb components.





--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Thank you!

This topic is closed to new replies.

Advertisement