Depth Clamped Decals

[QUOTE=Alfonse Reinheart;1242563]I’ll assume that you meant, “Like if two draw calls don’t overlap in screen space.” So what if they don’t? Do you think that the hardware is incapable of figuring out how to order the fragments spit out by the rasterizer? Do you think that the driver and hardware can’t work this stuff out on its own?

My point is that hardware already does this. It is not rasterizing one triangle, writing its values, then rasterizing the next. It is a pipelined, parallel process. The end products appear to have been rendered in-order, but that doesn’t mean that’s how the hardware did it.[/QUOTE]

Yes I suppose at the triangle level the rasterizer can keep track of the regions it is working on. Or even do blocks etc with some amount of redraw. I dunno. I never really questioned this; though neither had it ever occurred to me to really think about it, until I was thinking about this (forum) thread drawing to the stencil buffer in an interleaved way. That seems a little high level for the driver to be fretting about. It seems like there would be a necessary start and stop even though the affected regions might not overlap.

I don’t know what I was thinking. Maybe just that it would be simpler to flush conservatively than to micro manage an asynchronous API since the feature was built into OpenGL (but I clearly did not know what I was talking about)

glFlush might be appropriate too. I dunno. http://stackoverflow.com/questions/3…ng-correctness probably has the answer…