Search Issue Tracker
By Design
Votes
0
Found in
5.5.0f3
Issue ID
862214
Regression
Yes
[Shaders] GrabPass refraction shows wrong result since 5.5
Reproduction steps.
1. Open project attached (ShaderBugProjects.zip)
2. Open Scene "scene".
3. Investigate object with Refraction.
Expected result: Refraction in 5.5 and 5.6 will look similar or identical to 5.4
Actual result: Refraction in 5.5 and 5.6 look weird. Totally different from expected result.
Notes: Adjust refraction to change its quality.
Reproduced on 5.5.0b7, 5.5.0p3. 5.6.0b3
Works fine on: 5.3.7p3, 5.4.2f2, 5.4.4f1
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
- "Objects are trying to be loaded during a domain backup." errors on entering Playmode
- Transform Node does not have outputs when it is created
- Changing the Default Icon does not change the executable's icon when re-building the project
- Texture is stored upside down when using Blit
- [OpenGLES][XR] Zooming in on the camera's URP opaque texture causes "double vision" on Quest in OpenGLES3
Aras
Jan 09, 2017 06:28
It seems that the depth buffer precision improvements ("Z-buffer float inverted" in 5.5 https://docs.unity3d.com/Manual/UpgradeGuide55.html) requires some shader changes for your particular use case. Specifically, the screenPos.z on the platforms that has this "reversed" depth buffer now goes in the other direction. Adding this as the first line of your surf() shader function fixes things:
IN.screenPos.z = UNITY_Z_0_FAR_FROM_CLIPSPACE(IN.screenPos.z);