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.
- All models become suddenly stuck in weird poses and Animations are messed up when previewing any character animation in the Editor and looking around in the Scene View
- Files are not included in the “Assembly-CSharp.csproj” file when they are in the Editor folder
- [URP] Specular Color behavior does not match Legacy or HDRP
- [Linux] Array Element doesn't duplicate/delete when clicking "Duplicate/Delete Array Element" on an Array Element in a Prefab GameObject
- [ShaderGraph] Skewed guidelines are drawn from the top left corner of the Node when it is moved