Sign in to follow this  

Shadowmap resolution performance

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

Hey guys. I've been having some problems understanding the results I've been getting with my shadowmap implementation, and I was hoping you guys might be able to help. My test setup uses a scene with a fixed amount of polygons but with 1,2,4 or 8 lightsources as shown on the x-axis of the image provided. The y-axis displays the performence messured as FPS. The thing I don't completly understand is how the performance decreases with around 50% each time I up the shadowmap resolution once (say from 512 -> 1024). The amount of sampled values should stay constant since I'm not changing the framebuffer resolution correct? Anyhow hope someone can help me out here.

Share this post


Link to post
Share on other sites
Well alot of the work performed by a shadow map shader is building the shadow map. So doubling the size of the shadow map is going to double the work load for that portion of the effect.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dave
Well alot of the work performed by a shadow map shader is building the shadow map. So doubling the size of the shadow map is going to double the work load for that portion of the effect.

Doubling the resolution leads to four times more work and not twice!

Share this post


Link to post
Share on other sites
Yeah indeed it does but the amount of work that is quadoubled doesn't seam to be very workintensive (The GPU program is like 4 lines). It's outputting the depth into a texture. True the values need to be copied from the depthbuffer to the texture, but it _halfs_ the performance. It just seams like a lot in my mind.

Share this post


Link to post
Share on other sites
On top of burning four times as much fillrate when generating the shadowmap, you are getting texture cache misses four times as often when sampling the shadowmap, which is probably stalling your pixel shader execution (I bet most of your PS arithmetic is dependent on the result of the shadowmap sampling).

Regards.

Share this post


Link to post
Share on other sites
Quote:
Original post by Enrico
Quote:
Original post by Dave
Well alot of the work performed by a shadow map shader is building the shadow map. So doubling the size of the shadow map is going to double the work load for that portion of the effect.

Doubling the resolution leads to four times more work and not twice!


Just testing you!

Share this post


Link to post
Share on other sites
What is your shadow texture format? Floating point or integer? FP16?
If its floating point, do you see the same fall off with increased shadow map size when using integer or FP16?
I assume by your figures you have a presentation interval of immediate - which probably means the GPU is just stalling before you've asked for the immedaite present, which seems perfectly normal and reasonable to me.

Share this post


Link to post
Share on other sites

This topic is 3870 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.

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