Jump to content
  • Advertisement
Sign in to follow this  
Acid-Chris

Shadowing through .fx files

This topic is 3740 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 all, I've got a flat plane which is my "ground" for now which has a very basic shader using one texture. All other objects (scene-models) use a different fx shader file during rendering. So, my question is...how does shadowing work on scenes which use multiple shaders for objects? Or...how does one of the scene-models cast/project the shadow onto the ground plane? The examples i found in the DXSDK are using one shader for everything. Can anyone recommend a good link with more information on this? best regards

Share this post


Link to post
Share on other sites
Advertisement
I'm guessing you're talking about shadow-maps here? Probably the easiest thing to do would be to create new techniques in both your model effect and your ground effect, with these new technique incorporating the code for querying the shadow map. You can pretty much contain all the shadow-map stuff to a single function, and the shader in your shadow technique can simply call that function to determine the shadow occlusion factor.

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!