Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
That's for 5.1.4
First part of renderTexture stencil optimization: reduce the memory of renderTexture in case there are no masks. Comparing to v4 that was a downgrade.
Next PR's will add temporary pow2 renderbuffers for filters, and add a setting to allow run pixi in stencil-less webgl.
Open chrome or canary, single page, press SHIFT+ESC, look in GPU process memory
1000 renderTextures of size 256x256.
In windows stencil+depth is 32bit, and STENCIL8 cant help, it always creates both. +33% tax on potential mipmaps for colorbuffer.
That's 350kb colorbuffer per one renderTexture +256kb stencil/depth.
That means 350MB vs 600MB if we use stencil for every texture.
My measurements:
Empty playground, 140M total.
Stencil, 800M GPU total in chrome canary: https://www.pixiplayground.com/#/edit/8vkPJSK3IBCisZYdc6YC1
This branch, no stencil, 550M
https://www.pixiplayground.com/#/edit/3Bxzpc~OW18PHxsJ3wxcc
I dont know where else 60M goes, but I think we can ignore that.
Proof that
forceStencil()
code works, filter onapp.stage
: https://www.pixiplayground.com/#/edit/aN_YFvmR5W6UmSl6Han6X