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
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
- Console shows Exception: {"error":"not found","detail":["not found"]} after opening Build History window
- [HDRP] Volumetric cloud shadows disappear when there is no directional light shadows
- “Selector” column names in the Search window are lowercase when added
- Install List Project Counter Panel can be right clicked through and Install Context Menu can be opened disabling Project Counter Panel's buttons
- [MacOS] Scene is marked/flickering as dirty (with asterisk) when dragging a Material on a GameObject in Scene view
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.