Hi, I was trying to support SRP Batching on my custom URP shader.
- Move all parameters in inspector to one “UnityPerMaterial” cbuffer.
- Make sure the shader has a “UnityPerDraw” cbuffer. (include “UnityInput.hlsl”)
I finished it successfully on 2022.2.a17 URP14.0.3. (Everything works fine)
But when I test it on URP13-12, the mesh (with my shader) will always stay at the origin.
Then I realized that there must be some thing wrong with the “unity_ObjectToWorld” matrix.
(but I cannot see that matrix in Frame Debugger, the same to URP Lit shader)
I include “UnityInput.hlsl” manually but the problem still exists. (It should be included by other URP files)
So, how can I fix the OS->WS conversion on URP 13 or what happened to SRP batching on URP 14?
Thx a lot!