Search Issue Tracker
Fixed
Votes
1
Found in
5.3.3p2
Issue ID
781511
Regression
No
[GLES2][GLSL] Step function does not work properly if edge parameter is a float
Repro steps:
1) Open the project with OpenGLES2 graphics API
2) Notice the cube which is white
3) Change the API to GLCore or DX
4) Notice the cube is now red
Workaround: use float4 instead of float in the step function of shader(See screenshots)
Reproduced in: 5.4.0b11; 5.3.4f1; 5.2.4f1
Comments (2)
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
- Crash on PersistentManager::GetSerializedFileIfObjectAvailable when opening a specific project
- An extra separation line is present between the options in the AssetBundle and it's Variants dropdown Menus
- Xcode VisionOS builds fail with a "Circular dependency..." error when the used project is named "Metal"
- ScrollView.ScrollTo method does not work when trying to scroll to an item that has been added in the same frame
- “KeyNotFoundException” error thrown when pressing “Layout Loop++” in UI Toolkit Layout Debugger button
rainer_klanggames
Apr 27, 2016 18:35
Further digging shows that the < and > operator is broken
rainer_klanggames
Apr 26, 2016 16:08
I also have this issue in 5.3.4p4
Device: OnePlus latest OS
Renderer: OpenGLES 3
Workaround: Using OpenGLES 2 as first priority or like the reporter suggests
My workaround:
float4 unity_bug_workaround = float4(sourceColor.r, sourceColor.r, sourceColor.r, sourceColor.r);
float4 unity_bug_workaround_alpha = step(unity_bug_workaround.r, 0.99f);
float alpha = unity_bug_workaround_alpha;
My original code:
float alpha = step(sourceColor.r, 0.99f);