Instancing breaking because of DisableBatching tag
Hi,
First, thanks for the awesome plugin! I've been however running into an issue as soon as I render the same type of shape twice using immediate mode with Unity 2020.3.20f1 (maybe this version is not supported?).
I've been investigating using the C# debugger and the frame analyzer. Turns out that DrawMeshInstanced is added into the command buffer but is silently ignored and not visible in the frame analyzer.
Not sure why this happens, however it seems that removing
"DisableBatching" = "True"
from the shader solves my issue.
This is what my code looks like, if it has any importance:
using(Draw.Command(cam)) { Draw.LineGeometry = lineGeometry; Draw.ThicknessSpace = thicknessSpace; ResetCursor(); while(NextEntry()) { Vector3 pos = location.Get(this); float radius = size.Get(this); Color c = color.Get(this); c.a *= m_alphaMultiplier; Draw.Color = c; Draw.Disc(pos, fw, radius); } }
Same thing for Arc and Lines.
Kind regards,
- Nicolas
hm, it seems like GPU instancing is somehow broken or disabled in your project. do you know of any settings that might cause it, or some obscure target platform?