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
Comments (1)
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
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
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);