flambe icon indicating copy to clipboard operation
flambe copied to clipboard

Optimization for Stage3DBatcher ...

Open volkipp opened this issue 10 years ago • 2 comments

I believe this should fix #314. I've created a stress using 2000 animated MovieSprites. With these changes I'm getting a solid 60FPS. Without the changes, I top out at about 20FPS. Hopefully this doesn't introduce any weird bugs, but so far it's been solid for me on my projects.

The stress test demo I'm using can be downloaded here: http://clients.seven2.com/out/batcher-stress-test.zip

volkipp avatar Jan 26 '15 18:01 volkipp

I'm not into these batchers but shouldn't the same conditions be done in the WebGLBatcher?

markknol avatar Jan 26 '15 20:01 markknol

@markknol I looked at doing the same thing in WebGL batcher and it doesn't seem to work quite the same way, and doesn't suffer from the same performance hit as Stage3D. I think it has to do with the requirement of clearing out textures when changing rendering contexts in Stage3D, which doesn't apply for WebGL. All I did was check to see if we are using the same texture root (therefore the same texture in the GPU), and make sure we don't call flush when it's not needed. My understanding of what is going on there is a little fuzzy, so it's possible it's just me.

volkipp avatar Jan 26 '15 22:01 volkipp