Search Issue Tracker
Won't Fix
Votes
0
Found in
5.6.0f1
Issue ID
899864
Regression
No
Shader division by integer crashes Unity
Reproduction steps:
1. Open the attached project "Alex Portfolio.zip";
2. Open the Water.shader file;
3. Find 50 line in the code and uncomment it;
4. Save the file and go back to Unity;
5. Observe the crash.
Expected results: Divisions by integers should work a little bit slowly, but not cause the crash;
Actual results: Editor is crashing.
Reproduced on: 5.6.0f3, 2017.1.0b1;
Not reproduced on: 5.5.3f1, 5.5.0f3.
Workaround:
Instead of using integer:
fixed offset = 1 / _WavesNumber;
You should divide it like this::
fixed offset = 1.0 / _WavesNumber;
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- OnPostprocessAllAssets() is not called for a modified Prefab when another Asset is set Dirty in the same callback
- [Android] UIToolkit ClickEvent is fired when the device is rotated
- Compilation errors occur when "uintBitsToFloat(int)" gets used in OpenGLES
- User Reporting does not send reports when Managed Stripping Level is set to Low or higher
- Editor crashes and a window with "GetManagerFromContext: pointer to object of manager 'MonoManager' is NULL (table index 5)" error is thrown when launching a project with a corrupted library
Add comment