how to batch-drawCall for many shader-clip textured quad?
eg. there are many textured-circle, each one is drawn as this:
draw quad with texture
clip quad to circle with shader and scissor state
as clip break the batching-drawCall, when there are many this textured circle, there are many drawCall.
is there any way to batching all of these drawCall?
Thanks!
I don’t really understand what you are trying to do. I don’t think I’ve heard the term “shader-clip” before, do you mean your fragment shader is using discard to not draw fragments outside the circle?
I also don’t see where the scissor test helps - I’m only familiar with it being used to restrict drawing to a rectangular region of the frame buffer, but since you are already drawing a quad you can achieve the same thing by positioning the quad where you want it.
Can you explain a bit more what it is you are trying to do and why something straightforward like an instanced draw call or even drawing all quads with one single draw call is not applicable?