Sign in to follow this  
Acid-Chris

Shadowing through .fx files

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this