Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.2.0f2
Issue ID
1059656
Regression
No
[Metal] Shader output shows corrupted textures
Reproduction steps:
1. Open the attached project (ECSSample00.zip).
2. Play the 'main' scene.
- Notice a texture shape.
3. Open the "Shaders/sprite_instanced.shader" file.
4. Comment line 65: float2 uv = float2((vid&0x1) == 0 ? uv0.x : uv0.z, (vid/0x2) == 0 ? uv0.y : uv0.w)
5. Uncomment line 64: float2 uv = float2((vid&0x1) == 0 ? uv0.x : uv0.z, (vid/2) == 0 ? uv0.y : uv0.w);
6. Play the main scene again.
Actual behavior (Screenshots attached):
- Texture shape gets corrupted.
Reproduced with:
2018.1.1f1, 2018.1.9f1, 2018.2.3f1, 2018.3.0a8
Note:
Couldn't test with OpenGL: "-------- GLSL link error: ERROR: Implementation limit of 4096 (e.g., number of built-in plus user defined active uniforms components) exceeded, vertex shader uses 12300 total uniforms."
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 "HLSL" compiler issue (not in our pipeline). The "fix" is easy - just use vertexid as *uint* as it should be, otherwise HLSL compiler adds some weird code to do signed division (why 0x2 works - i guess it is treated as unsigned, at least unsigned ops are generated)