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
- Editor crashes and a window with "GetManagerFromContext: pointer to object of manager 'MonoManager' is NULL (table index 5)" error is shown when launching a freshly created project
- Editor Windows dragging behavior is erratic/glitchy when a specific multi-display setup is used and the Editor window is not on the main display
- Meta Quest missing an icon in Build Profiles window in U6.0
- Foldout arrow indent is misaligned in the Inspector when used for Arrays or Lists
- Material import pipeline strips properties when it is added with a script
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