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
- Top and bottom color channels are swapped when lighting an object with Six Way Shader Graph in URP
- "Problem detected while importing the Prefab file" errors on Learning Templates import
- Crash on RaiseException during Socket.BeginConnect in Player when application connection is blocked through commercial firewall
- Decal Projector produces artifacts when the normal and decal are projected in negative z-direction and Normal Blend is set to 1
- Undoing slider field change only resets slider position, doesn't undo the value change
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)