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
- The Editor becomes unresponsive and memory allocation errors are spammed in the Console when Generating Lightning
- Crash on BatchApplyPropertiesFromSourceAssetDB when opening a specific project
- Scene view Camera cannot be moved with WASD/QE keys when the Right Mouse Button is held down and the Mouse is not moved
- Crash when calling default interface method from virtual method with same name
- [Android] Unity does not include the ".aab" extension for an AppBundle when it is built via script with the buildPlayerOptions.locationPathName = "AppName.apk" and EditorUserBuildSettings.buildAppBundle = true
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