Hi all, i have a custom shader that works perfectly with all the correct Unity Api for GPU instancing and property changes to those instances.
The major problem i am having is when i set a clone’s material’s render order through C# script with,
renderer.Material.renderQueue = 3005; // transparency order
I have noticed Unity will no longer GPU instance duplicates of that clone, meaning “saved by batching” drops to zero and batch count and draw call increment Per duplicate.
If i comment out the renderQueue line from the script, everything returns to normal and all clones using the shader and material are all saved by batching.
Is there a HLSL tag in the shader that i need to modify? If so, what would it look like?
Thanks in advanced.