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
- UI Toolkit meshes are fully rendered and rasterized when opacity is 0
- Light rendering artefacts appear in the Editor when assigning unsupported 3D Custom Render Texture in Camera’s Output Texture, unclearable errors and warnings spammed
- Memory leak when running a test with "GfxThreadingMode" set to "SplitJobs"
- Loading Unloaded unsaved Scene throws “ArgumentException” error in the Console
- Crash on std::__1::__tree_const_iterator when opening the Build Profiles window in a specific 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);