Note: This repros on 4.27 and all 5.x versions.
When using the mobile renderer and/or forward shading, Planar Reflection will simply not work if the reflection plane normal has components that add to near-zero. This can happen, for example, if the plane is placed vertically as a mirror and with a -45 degrees rotation around the z axis, which gives a normal like (-0.707, 0.707, 0.0).
The bug has been tracked down to the following files:
On both those files, planar reflection is only evaluated when the following condition passes: if (abs(dot(PlanarReflectionStruct.ReflectionPlane.xyz, 1)) > .0001f)
A comment in ForwardLightingCommon.ush states that the "Plane normal will be zero if the feature is disabled", so it seems that the check simply aims to detect a zero-length normal. The current test, however, incorrectly fails for any normal whose components add to near-zero. The licensee that reported the issue suggested that the check be adjusted to one of the following alternatives, both of which seem to work correctly:
if (dot(abs(PlanarReflectionStruct.ReflectionPlane.xyz), 1) > .0001f)
if (dot(PlanarReflectionStruct.ReflectionPlane.xyz, PlanarReflectionStruct.ReflectionPlane.xyz) > .0001f)
=== BLANK PROJECT ===
1. Create a new project (suggested: mobile, scalable)
2. In the project settings:
2.1. enable "Engine – Rendering – Forward Renderer – Forward Shading"
2.2. enable "Engine – Rendering – Reflections – Support global clip plane for Planar Reflections"
3. restart the Editor
4. Place a "PlanarReflection" actor on the level at location (0,0,0) and with rotation (0,90,-45)
5. Place a cube in front of the reflection plane
6. Note that the PlanarReflection plane is not working
7. Rotate the PlanarReflection plane a little in any axis
8. Note that the reflection is now working
=== REPRO PROJECT ===
1. Download, unzip and open the repro project
2. Note that the PlanarReflection plane across the level is not working
3. Rotate the PlanarReflection plane a little in any axis
4. Note that the reflection is now working
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-334287 in the post.
0 |
Component | UE - Rendering Architecture |
---|
Created | Sep 24, 2025 |
---|---|
Updated | Sep 26, 2025 |