Sign in to follow this  

Shadowing through .fx files

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