Shadow mapping performance

This topic contains 2 replies, has 2 voices, and was last updated by  Joe Davis 5 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30962

    lefty
    Member

    Hi,
    I have being trying out the code used in the shadow mapping example in the training course.
    I notice an huge performance hit when I enable shadow mapping for my own scene (goes from 49.7 fps to 24.5 fps). At first I thought that it was simply because you have to render everything twice for shadow mapping, but this is not the case. It seems that using the render depth framebuffer itself is whats causing the performance hit.
    Is this to be expected, or am I doing some thing wrong?
    thanks,
    Ed

    #36127

    lefty
    Member

    Nevermind that post.
    It that the performance hit is because of extra work shader has to do, combined with the fact everything needs to be rendered twice

    #36128

    Joe Davis
    Member

    HI lefty,

    Sorry for not getting in touch sooner. Glad to hear you’ve identified the reasons for the performance drop 🙂

    If you want to get a more in-depth understanding of what the GPU is doing, you can use PVRTune on Android or Linux. Also, you can simplify your shadow mapping render pass to see how this affects performance.
    It may also be worth considering optimizations, such as reducing the number of objects in your shadow pass (for example, cull objects that wont affect the shadow) or baking the shadow map into a texture off-line if you have static shadows in your scene.

    Thanks,
    Joe

    Joe2012-09-20 11:01:14

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.