Search Issue Tracker
Fixed in 2022.2.X
[OpenGL]GLSL compilation failed for shader error thrown in Console window when HLSL firstbithigh() function is converted to GLSL
1. Open the attached user's Unity project "HLSLtoGLSLBug.zip"
2. Navigate to Edit > Project Settings > Player Settings
3. Make sure that OpenGL3 or OpenGLCore is selected in Auto Graphics API for the Windows section
4. Go back to the Editor, enter Play mode, and observe the Console window
Expected result: No errors are thrown and results are printed in the Console window
Actual result: Errors are thrown in the Console window: "LSL compilation failed for shader"
Reproducible with: 2019.4.36f1, 2020.3.31f1, 2021.2.16f1, 2022.1.0b12, 2022.2.0a8
- The issue is not reproducible with Direct3D11 Auto Graphics API on Windows
- The issue is reproducible with OpenGLES3 and OpenGLCore Auto Graphics APIs on Windows
- The issue is not reproducible on macOS when Auto Graphics API is set to Metal
- When Auto Graphics API is set to OpenGLCore on macOS, errors are thrown in the Console window: "Kernel 'Main' not found", "ArgumentException: Kernel 'Main' not found.". Same errors are thrown on Windows machine when Auto Graphics API is set to OpenGLES2
- In 2019.4.36f1 Unity version error appears when selecting OpenGL3 or OpenGLCore is selected in Auto Graphics API in Player Settings
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Sprite Preview is broken when the Sprite is too tall or too wide
- Objects are invisible in Scene view when using Wireframe Shading Mode
- The property of a component becomes read-only when it is bound to "PropertyStreamHandle"
- Physics.Raycast does not work when used on the whole model
- Shader Graph changes the Position of Prefab instances in Play mode
Resolution Note (fix version 2022.2):
Fixed in: 2022.2.0a10