Search Issue Tracker
Fixed in 5.4.3
Votes
0
Found in
5.4.0p1
Issue ID
832292
Regression
No
Issues with cube map sampler changes in 5.4
According to "Upgrading to Unity 5.4" there are changes with how you sample unity_SpecCube1.
"Reflection probes share a sampler between the two textures. If you are sampling them manually in your shader, and get an “undeclared identifier samplerunity_SpecCube1” error, you’ll need to change code from UNITY_PASS_TEXCUBE(unity_SpecCube1) to UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1,unity_SpecCube0)."
It doesn't appear that we always use UNITY_PASS_TEXCUBE but usually use the other helper macros.
In the case of UNITY_SAMPLE_TEXCUBE we can just switch from UNITY_SAMPLE_TEXCUBE(unity_SpecCube1, coord) to UNITY_SAMPLE_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0, coord)
However there is no equivalent helper for lod samples. This exists UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube1, coord, lod) but this doesn't UNITY_SAMPLE_TEXCUBE_LOD_SAMPLER(unity_SpecCube1, unity_SpecCube0, coord, lod)
Is UNITY_SAMPLE_TEXCUBE_LOD_SAMPLER a helper macro that should exist but doesn't? If it should exist there are various other texture types that would also need UNITY_SAMPLE_*_LOD_SAMPLER equivalents.
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Hornets
Jan 07, 2017 16:23
What i wanted to say is that the problem still persists in 5.5 with GLES3
Hornets
Jan 07, 2017 14:10
This seems to only apply to GLES3. GLES2 works with UNITY_SAMPLE_TEXCUBE_LOD()