Hitch/Permanent FPS Drop Occluding Planar Reflection

Reproduce:

  • Add planar reflection to FPS project (enable global clipping plane, add planar reflection actor)
  • Add big plane reflecting sky
  • Run in standalone/packaged
  • Move camera up slowly
  • Notice how there is a framerate spike at moment when planar reflection plane gets out of view and then back in again
  • Even worse on XboxOne the framerate drops and never recovers after this as can be seen in the video (before: 13.5ms, after: 15.5ms)

Expected:

  • Framerate should not hitch
  • Framerate should get back to normal when moving view down (XboxOne)

Proof:

  • [Video on XboxOne showing hitch and permanent drop][1]
  • Screenshot on PC showing hitch only (same events as in video above):

Workaround:

  • Disabling frustum/view check fixes the issue and highlights that there is a problem (works in my case since body of water is almost always visible anyways):

    diff --git a/Engine/Source/Runtime/Renderer/Private/PlanarReflectionRendering.cpp b/Engine/Source/Runtime/Renderer/Private/PlanarReflectionRendering.cpp
    index 7551feb…62fbdd3 100644
    — a/Engine/Source/Runtime/Renderer/Private/PlanarReflectionRendering.cpp
    +++ b/Engine/Source/Runtime/Renderer/Private/PlanarReflectionRendering.cpp
    @@ -164,6 +164,7 @@ static void UpdatePlanarReflectionContents_RenderThread(
    {
    QUICK_SCOPE_CYCLE_COUNTER(STAT_RenderPlanarReflection);

    +#if 0
    FBox PlanarReflectionBounds = SceneProxy->WorldBounds;

     bool bIsInAnyFrustum = false;
    

    @@ -213,6 +214,9 @@ static void UpdatePlanarReflectionContents_RenderThread(
    }

     	if (bIsVisibleInAnyView)
    

    +#else

    • {
      +#endif
      {
      FMemMark MemStackMark(FMemStack::Get());

Hope it helps.

Hey dgrieshofer,

I didn’t get the same behavior while testing on my end. Would you mind testing this by following these steps:

  • Open a blank project
  • Check “support global clip plane for planar reflections” restart project
  • Scale the floor mesh in the default seen by the X and Y axis to be 100x100
  • Add a planar reflections actor and scale it up to match the floor mesh
  • (optional) add a few simple box meshes to the scene that will show up in the reflection.
  • Add a material to the floor mesh that is reflective (look at the screenshot for the material I used)
  • Enable Stat UnitGraph and StatFPS
  • Play In Editor (PIE)
  • Slowly look up at the sky and observe the results

RESULT
The Draw thread increases in MS while looking at the reflection and lowers when looking up.

These results were expected and I didn’t see any major drop in FPS. There could be something else at play here which is why I would like for you to test in a blank project so we can narrow things down a bit.

,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

,