Jump to content
  • Advertisement
Sign in to follow this  
McZ

shadow maps?

This topic is 5405 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 have been reading a little about shadow-maps and as far I have understand I draw the scene from each lightsource to a depthmap. is that depthmap the same for that lightsource regardless of the object? e.g. pass 0 - render all objects from each lightsource to a depthmap pass 1 - render all objects with only ambient light pass 2 - render all objects with diffuse,specular.. lights and depthmap test (maybe this would be pass 1?) is this correct way of doing this?

Share this post


Link to post
Share on other sites
Advertisement
thank you for the extension link :)


but how do I process the shadow map issue in large scenes? all tutorials/examples only use a small amount of objects..

I have been thinking that I should add a pre shadowing pass where I render the shadowmaps, should I attach the shadow map to the light? so I know which light each map is for? or how should I else keep track of each shadow map?

Share this post


Link to post
Share on other sites
Yes, each shadowmap should attach to a light(or if you have ShadowMapManager, shadowmapID will do), and render to shadowmaps needs to got to PRERENDER stage, and comparing shadowmaps goes to RENDER stage.

Share this post


Link to post
Share on other sites
so then the setup would be something like this:

Pass 0
render light(s) to depthmap
bind depthmap to light (using a manager or directly to the light)


Pass 1
enable the depthmap and ARB_shadow_ambient stuff
render the scene as normaly


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!