by SomeCallMeTim · 9y ago · 0 comments
A web page may not be able to reuse as much image data, I know. But smart game engines frequently look for ways to better batch sprites.
And technically speaking, if you're using a Z-buffer, you don't need to sort opaque layers at all. You can draw the layers in back and then draw more layers in front. Yes, you get overdraw in that case, but if you're using Z values for layering, you could potentially get better batches by drawing in arbitrary order (i.e., relying on Z-depth to enforce opaque object order), and in my experience larger batches gives you a bigger advantage than reducing overdraw.
Win 10, latest nightly, WebRender enabled
I had to get to hundreds of thousands (maybe 250k?) and it started bouncing between 40 and 60.
Very neat.