Search Issue Tracker
By Design
Votes
0
Found in
2021.3.29f1
2022.3.6f1
2023.1.7f1
2023.2.0b3
Issue ID
UUM-44345
Regression
No
Shader errors while using Vulkan Graphics API when shaders use native 16-bit precision
How to reproduce:
1. Open the “IN-49199_min16float 23(2).zip“ project
2. Open the “SampleScene“
Expected result: No error can be seen in the Console
Actual result: Error is observed in the Console
Reproducible with: 2021.3.29f1, 2022.3.6f1, 2023.1.7f1, 2023.2.0b3
Reproducible on: Windows 10, M1 Apple Silicon and Android devices (Samsung S21).
Error:
Shader error in 'Custom/HalfTextureColor': SV_Position must be a 4-component 32-bit float vector or a composite which recursively contains only such a vector at line 44 (on vulkan)
(in 2022.3.X versions and older)
Shader error in 'Custom/HalfTextureColor': Program 'Frag', fatal error: generated SPIR-V is invalid: According to the Vulkan spec BuiltIn FragCoord variable needs to be a 4-component 32-bit float vector. ID <3> (OpVariable) has components with bit width 16. (on vulkan)
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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Resolution Note:
This is expected and the shader errors actually tell the reason. The problem shader is trying to use half typed SV_POSITION, which is not valid. Changing that specific varying to float4 fixes the errors.