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
- The Graph Debug Window can be right clicked through and the Node Workspace is manipulated instead
- [Linux] Top left corner of the screen is unresponsive when the Editor recompiles
- [Android] [Vulkan] Cubes stuck on the first few frames of rotation and application flickering when an Overlay Camera is added to the Camera Stack with MSAA enabled
- Profiling information icon does not update for Light Mode
- [Linux] Type to select functionality is missing for drop down menus
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);