New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FBO / Copying Stage Texture #7931
Comments
Hi! pixi-layers has inherent double-buffering, ping-pong stuff: https://pixijs.io/examples/#/plugin-layers/trail.js its using renderTextures inside, so yeah, its possible, its just you did something wrong, not everyone can do double-buffering ;) there's no "copy texture" in pixi, you have to 1. make a sprite with texture 2. call Summary:
|
Thanks @ivanpopelyshev ! I see this trails example is from v4/v5 and using flags like useDoubleBuffer and useRenderTexture, but this isn't in v6, so I am trying again with RenderTexture. My code is a bit spread out, so I'll try my best to show it. I pass the texture from each source into the uniforms of a shader which is applied to a single Graphic object on the stage:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello, this is not an issue per-se, so apologies if this would be better posted on the forum.
Expected Behavior
I’ve been struggling a while now to find a way to “copy” the stage / canvas texture and reuse it as an input texture.
The end goal is to create video feedback effects (similar to “trails”) - where the previously drawn frame is used inside the stage with filter shaders.
In non-JS creative coding frameworks the flow would be: create FBO -> render stage into FBO -> use FBO texture.
Current Behavior
With PIXI I’ve tried following various multiple canvas, ping-pong buffer and dual PIXI.Renderer examples, but get two outcomes:
Possible Solution
I had success with: extract base64 -> load into canvas -> load canvas into Texture - but this is obviously very slow.
Would love to know how best to use PIXI.Renderer to get this outcome.
Steps to Reproduce
Referencing some other issues, in case others are also trying to work this out:
#5216
#5259
#5411
#1366
#4552
Thank you!
Environment
Chromium 93
pixi.js ^6.1.3
MacOS
The text was updated successfully, but these errors were encountered: