Search Issue Tracker
Won't Fix
Votes
5
Found in
2018.1.0b5
Issue ID
999980
Regression
No
[VR] Incorrect shadows and projections when using SetStereoProjectionMatrix() to create planar reflections
The attached project implements planar reflections by mirroring a camera across a reflection plane (plane at y=0, normal=+y).
How to reproduce:
*Incorrect Multipass Shadows:
1) Open the attached project and enable Oculus or OpenVR SDKs.
2) Set Stereo Rendering Method to Multipass.
3) Enable the directional light, play, and notice that the shadows of the reflected objects below the plane are incorrect.
4) Enable the point light and disable the directional light. The shadows cast by the point light should appear correct on the reflected objects below the plane.
*Incorrect Singlepass Reflections:
1) Open the attached project and enable Oculus or OpenVR SDKs.
2) Set Stereo Rendering Method to Singlepass.
3) Enter playmode. The reflected objects below the plane will appear to be incorrectly scaled and translated.
Results:
*Multipass:
Expected Results: The cubes, lighting, and shadows should correctly be reproduced by the reflected camera.
Actual Results: Realtime directional shadows are incorrect in the right eye while point light shadows remain correct in both eyes.
*Singlepass:
Expected Results: The cubes, lighting, and shadows should correctly be reproduced by the reflected camera.
Actual Results:
-Entire output from the reflected camera is incorrect.
-It appears to be scaled along the HMD's horizontal axis.
-The edge of the right eye's occlusion mesh is visible in the left eye.
Reproducible in all version of Unity (5.6+).
Note: Behavior is correct in 2D.
-
swanickj
May 21, 2019 17:28
Has anyone found a fix for this?
-
bonkersz
Jul 11, 2018 15:47
I noticed this same issue using SetStereoViewMatrix (not overriding the projection matrix). Has the same breaking of singlepass, and incorrect directional light shadows in multipass.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on RenderBufferManager::Textures::GetTempBuffer when rendering a specific scene
- The Inspector header is incorrectly displayed when scripts are recompiled while a Scriptable Object instance is selected
- NullReferenceException is thrown when overriding the UxmlObjectReferences in template instances
- Shaders created with Shader Graph generate a large amount of shader variants and cause slow build times when using a baked lightmap in BIRP
- Shader Graph Matrix property produces random output values when SRP Batcher is enabled
Resolution Note:
XR Management has evaluated this issue and determined that it does not meet our current bug severity threshold. If you would like your issue to be reviewed again, please re-submit your bug.