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
- Any small change in UI Builder Inspector refreshes Editor Inspector
- Inaccurate Box Collider boundaries on a rotated child Cube when the parent GameObject Scale is non-uniform
- [Android] "SHADOWS_SCREEN" set as shader Keyword when no "_ShadowMapTexture" is bound leads to freeze on a build on some Mali GPU devices
- The global scene list is overridden in a project built with command line when the Override Global Scene List setting is disabled in the build profile
- [Linux] AutoLocale log is logged when opening a project
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);