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.