Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X, 2021.2.X
SRPBatcher not increasing CBuffer size when material shader is changed
1. Open the attached project ("SRPBatcher_MaterialInstance_Shader_Switcheroo.zip")
2. Open the "Main" Scene: Assets > Scenes > "Main.asset"
3. Make a build for Windows platform: File > Build Settings > Click "Add Open Scenes" > Click "Build And Run"
4. In the built project change the right cube's shader: click "Switch Shader" button
5. Click "Set _Colour" and "Set _Padding[x]" buttons (these set the CBuffer float4s to 1)
Expected result: Right cube should turn white
Actual result: Right cube remains black
Reproducible with: 2019.4.29f1, 2020.3.14f1, 2021.1.17f1, 2021.2.0b5, 2022.1.0a4
Can't test with: 2018.4.36f1 (downgrading errors, Incompatible URP package)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- GameObject.GetComponents returns the wrong number of components
- Modifying Rigidbody2D.position doesn't stop interpolation when called during the FixedUpdate callback.
- GUI button looks different from Editor in a Build
- Live Profiler Timeline keeps losing frame data while scrolling inside Profiler window
- Input.mouseScrollDelta.y is not correctly mapped to mouse wheel when running an iOS app on Apple Silicon Mac