Hi,
I am using Graphics.RenderPrimitivesIndexedIndirect to render meshes.
All mesh data is stored in de-interleaved GraphicsBuffers (position, compressed normals/tangents, UVs, etc.).
Culling is done on the GPU via compute shaders.
For the last 3 years we used a custom SRP but now i want to port our stuff over to URP.
I want to make use of ShaderGraph during the porting process, so our (tech-)artists can use it in the future.
However, as it turns out, i can’t access SV_InstanceID in ShaderGraph. The shadergraph’s InstanceID-Node uses unity_InstanceID, which is NOT what i want.
(When using Graphics.RenderPrimitivesIndexedIndirect, unity_InstanceID is not available and you have to directly use SV_InstanceID instead. At least thats how we did it for the last 3 years.)
How can i access SV_InstanceID in ShaderGraph?
My current workaround is to open the shader that is generated by shadergraph, then manually patch the shader to use SV_InstanceID instead of unity_InstanceID. This works, but is a VERY time consuming process as i have to redo it every time i touch a shadergraph-shader…
(Please don’t tell me this is impossible / still missing from shadergraph / planned … )