UE 4.13 Shadow Depths Regression?

We updated our multiplayer FPS to UE4.13 yesterday and a lot of our players were complaining about bad FPS. Our players reported that lowering their ‘Shadow Quality’ had the greatest improvement to FPS.

I just ran some simple FPS/GPUProfile tests in the same location in 4.12 and 4.13 with Epic settings and it seems there may be a significant regression in performance in UE4.13? See the attached screenshots. 4.12 gets about 70fps and 4.13 gets about 54fps in the same location

UE4.12 GPUProfile:

UE4.13 GPUProfile:

here is the scene in question

UE4.12 screenshot: Dropbox - ue412screenshot.png - Simplify your life

UE4.13 screenshot: Dropbox - ue413screenshot.png - Simplify your life

Getting as similar issue, getting some major jittering within VR unless I lower shadow quality to Medium. 10-20fps loss from 4.12.

Hi Mentos and Tarwine,

Can you either one of your post a sample scene that can recreate the issue? I was able to a taxing scene setup in 4.12 and then when I opened that same scene in 4.13 I get better performance at the same settings by at least 10+ fps.

I’ll need to know specifics on the scene setup:

  • Light mobility and types used
  • Specific settings for the light if any
  • Any other steps/details to reproduce in a sample project would be ideal since an already developed project has too many things going on that makes it harder to narrow down anything to show the regression aside from just a profile screen or stat fps/unit.

New: Refactored shadow depth.

  • Shadow setup and render target allocation now happens in InitViews, and shadow depth rendering happens at one spot in the frame. This provides control over where shadow depths are rendered for things like async compute, and allows easy atlasing of shadowmaps for forward shading.
  • The 33Mb of shadow depth buffers in FSceneRenderTargets has been removed, and shadow depth buffers are now allocated as needed. Shadow depth memory is now unbounded which can cause Out of Video Memory in extreme cases.
  • A large amount of duplicated code to handle each shadow type has been combined.
  • Cleaner parallel rendering: no more view hacking for the shadow depth pass, no more shadow depths in the middle of translucency.
  • ‘vis ShadowDepthAtlas’ or ‘vis WholeSceneShadowMap’ must now be used to visualize the shadow depth textures.

This information may be helpful for you to know as well if you did not see it in the release notes.

Thanks!

Tim

Hey Tim,

After spending the day testing in a new project I believe I have found the cause of the perceived ‘regression’ with shadows. It all boils down to the fact that in UE4.13 shadows are still calculated for lights that have their intensity set to ‘0.0’ . In UE4.12 a light’s shadows were not calculated if the light’s intensity was set to 0.0

This became apparent in our project because we have player flashlights and lightning FX that were disabled by way of setting the intensity to 0.0. When we switched to UE4.13 we immediately saw a performance impact because of this. For now we are going to use ‘SetCastShadows(false)’ when we disable these lights.

If you’d like to test this add a bunch of spotlights to a scene in 4.12 and notice that setting their intensity to 0.0 will disable the calculation in ‘ProfileGPU’. Create the same scene in 4.13 and notice that an intensity of 0.0 does not affect the calculation and you must instead disable ‘CastShadows’ for the shadow calculation to be skipped.

I think the desired behavior would be if shadows were disabled at 0.0 intensity. Hope this helps!

Thank you,
George

Thanks George! That’s definitely a good test case and I was able to easily see the performance dip by about 30-40 FPS in my test project when having the light intensity set to 0 and the shadow casting still enabled.

You can track the status of the ticket here: Unreal Engine Issues and Bug Tracker (UE-35747)

Just testing out 4.16 preview it seems still there,on the issue tracker it says ‘cannot reproduce’.

I just ran the test project provided in the bug report and it does not occur on my end in the 4.16 preview 1 build. Are you sure you are testing against the same issue?

I can provide you with a test project if you wish so you can see for yourself. You would want to follow the steps on the tracker in order to test.

Thank you,

H

Sorry about that you’re right not getting that error anymore when looked in the GPU Visualiser and played with lights it’s no longer calculating the lights in my scene that are off.