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
- iOS Xcode project building fails when the build is appended
- 2D Colliders, attached to a grandchild GameObject, aren't immediately destroyed when destroying the parent GameObjects in FixedUpdate
- WebGL Player with WebGPU Graphics API fails to render Scene when custom Render Feature is used
- “EndLayoutGroup” error thrown when changing Shader Precision Model settings in Build Profiles window > Player Settings Overrides
- Button hover state uses default theme color when a custom .uss is applied
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)