Jump to content
  • Advertisement
Sign in to follow this  
ehsan_the_tiamat

multi pass rendering problem

This topic is 4315 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

HI i wanted to implement a shadow mapping shader with lighting unfortunately because im using PS_2.0 I hadnt have enough instruction slots(my lighting almost takes it all). now i want to seperate lighting and shadowing in two passes. Is this possible??? if its possile what are PS and VS arguments for the second pass. how should i pass lighting color to the second pass to use it for shadowing??? Is there an alternative solution for my problem???

Share this post


Link to post
Share on other sites
Advertisement
yes, it's possible, you shouldn't also change too many things... (i suppose :D )
Here's how i did: i have a shader for per-pixel lighting (bump mapping, specular and other stuff) and another shader that applies the shadowmap on the scene.

In the technique i use the shadowmap functions as first pass, then process the lighting using alpha blending this way:
AlphaBlendEnable = True;
SrcBlend = DESTCOLOR ;
DestBlend = zero;

hope it helps :)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!