Shadow mapping performance

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



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



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