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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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)