Search Issue Tracker
By Design
Votes
1
Found in
2021.3.37f1
2022.3.25f1
2023.2.19f1
6000.0.0b15
6000.1.0a7
6000.2.0a1
7000.0.0a1
Issue ID
UUM-69796
Regression
No
Unexpected transformations occur when executing 2D Vertex Shaders
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Scenes/SampleScene” Scene
3. Observe the Game View
Expected result: The “Red” and “Blue” GameObjects render at their origin ignoring the transform position
Actual result: The “Red” and “Blue” GameObjects render following their transform position
Reproducible with: 2021.3.37f1, 2022.3.25f1, 2023.2.19f1, 6000.0.0b15
Reproducible on: Windows 10, Ubuntu 22.04
Not reproducible on: No other environment tested
Workarounds:
- Disable “Red” or “Blue” GameObject. The other will be rendered properly
- Use different Materials with different Shaders. In this example apply “BrokenHLSL” Material to “Red” or “Blue” GameObject. Both will render properly
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
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
Resolution Note:
This is by design and working as intended. Sprite renderers use dynamic batching by default, which is why you see different world matrices depending if the sprites are batched. See https://docs.unity3d.com/6000.0/Documentation/Manual/dynamic-batching.html for batching limitations.
If you require to use world position in your shaders, consider using SRP Batcher instead where per object data is preserved. See https://docs.unity3d.com/Manual/SRPBatcher.html for more information. SRP Batcher for the 2D renderer is available and enabled by default in Unity 6.