Jump to content

  • Log In with Google      Sign In   
  • Create Account


Cascaded Shadow maps in a deferred renderer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Funkymunky   Members   -  Reputation: 621

Like
0Likes
Like

Posted 26 October 2013 - 04:56 PM

I have a deferred rendering implementation.  I'm implementing shadows, and have decided to do a cascaded shadow-maps approach to support large scenes.  It occurs to me that I have two options for how to do this.

 

I'm already transforming all the vertices for rendering to the various layers of my deferred implementation.  I could pass additional matrices for the cascade levels and simply output additional textures representing the shadow maps.  Alternatively, I could draw everything a second time explicitly for the purposes of shadow mapping.

 

In the first approach, my limitation is that each cascade layer will be the same dimensions as the framebuffer, which is pretty big.  In the second approach, I could use, say, 1024x1024 sized shadow maps, but I'd be doing all my draw calls a second time.

 

Does anyone have a suggestion as to which would be the more favorable approach?  I'm going to go ahead and implement it in a way that I can do either to see what the results are, but I was just wondering if anyone had any insights.



Sponsor:

#2 lunkhound   Members   -  Reputation: 581

Like
1Likes
Like

Posted 26 October 2013 - 06:30 PM

If you've got a light source such as the sun, casting shadows of off-screen geometry across the scene, then it seems like you'd want to cull/draw the main camera and the shadow camera separately.



#3 MJP   Moderators   -  Reputation: 10832

Like
0Likes
Like

Posted 28 October 2013 - 11:51 AM

You'll have to re-draw your geometry to generate your shadow map. Your shadow map and your main camera will use completely different projections, so you can't do them both in one pass. If you think about it this should make sense intuitively: an object that is off-screen can still cast a shadow that's visible on the screen.



#4 Funkymunky   Members   -  Reputation: 621

Like
0Likes
Like

Posted 29 October 2013 - 05:19 PM

I realized that about 5 minutes into trying to implement it and have since moved to a transform feedback / render to vertex stream approach






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS