Directx9 dot3 bump mapping

Started by
4 comments, last by miodragsm 19 years, 6 months ago
I've been experimenting with dot3 bm in dx9 ( with SDK example ) and i was wondering: there is just one light in example...can it be done for more lights in scene? and how?
Advertisement
Im not sure about FFP, but that is possable if you use a pixel shader - just sample a bump map, extract the normal, and do DP3's with that normal over several lights, multiply that by the light colour, then average all the pixel colours to get the final pixel value.

Good Luck!
Thanks for pixel shader solution! What about fixed function pipeline? Maybe multiple texture stages operations? But how?
I don't think you could do it, because you use two color args to use Dot3 bump mapping meaning that you couldn't combine a bump map with any stage below it.

Pixel shaders would probably be your best bet.
One way to do it using the FFP is to take an average of the colors and directions of the lights in the scene and use that for the dot3 calculation. Better than nothing I suppose.
Well, I guess it will have to do. Thank you all!

This topic is closed to new replies.

Advertisement