Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2020.2.X, 2021.1.X
Votes
0
Found in
2019.4
2020.2
2021.1
2021.1.0a7
2021.2
Issue ID
1299704
Regression
No
Compute shader loop treating integer constants as floats
Reproduction steps:
1. Create a new project or open an existing one
2. Add the attached Sky.compute shader in the project
3. Make sure that GLcore is included as a graphics API target in the Player settings
4. Select the shader and in the Inspector click "Show compiled code" button
5. See that u_xlat1 is initialized as float data but later used as int via floatBitsToInt
Expected results:
u_xlat1.xy = vec2(noisePeriod, intBitsToFloat(noiseStart));
for( ; floatBitsToInt(u_xlat1.y)<noiseEnd ; u_xlat1.y = intBitsToFloat(floatBitsToInt(u_xlat1.y) + 1))
Actual results:
u_xlat1.xy = vec2(noisePeriod, noiseStart);
for( ; floatBitsToInt(u_xlat1.y)<noiseEnd ; u_xlat1.y++)
Reproducible with: 2019.4.18f1, 2020.2.2f1, 2021.1.0b2, 2021.2.0a1
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
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a2
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0b7
Resolution Note (fix version 2020.2):
Fixed in 2020.2.6f1