Jump to content
  • Advertisement
Sign in to follow this  
miodragsm

Directx9 dot3 bump mapping

This topic is 5397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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!

Share this post


Link to post
Share on other sites
Thanks for pixel shader solution! What about fixed function pipeline? Maybe multiple texture stages operations? But how?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!