ZebraRoy Posted December 23, 2019 Share Posted December 23, 2019 How can I use the buffer function in filters? I want to do something like this Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 23, 2019 Share Posted December 23, 2019 I'm sorry, I'm not that good with shadertoy. Can you please elaborate? As for pixi filters, you can pass the texture in any uniform. If you want to use previous frame, here is a big hack that didnt make it into a plugin: https://github.com/pixijs/pixi.js/wiki/v5-Hacks#re-use-previous-frame-of-filtered-object And first thing that you have to do is to set filterArea to "app.screen" or "renderer.screen" because you really dont want to have problems with temporary pow2-sized textures, you need full screen first. You can move to temp textures later when your stuff works. ZebraRoy 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 23, 2019 Share Posted December 23, 2019 (edited) Filters are made to be applied on a temporary texture where container contents are displayed. If you dont have a container with stuff - most probably you dont need a filter. Maybe you need a mesh shader: https://pixijs.io/examples/#/mesh-and-shaders/triangle-textured.js Just use several meshes and juggle with renderTextures: https://pixijs.io/examples/#/textures/render-texture-advanced.js Unfortunately, we do not have a tutorial how to convert shadertoy examples to pixi. People who tried to convert something tried it on small examples and used mesh shaders and filters. For this big example - nobody tried, you'll be the first one. It doesn't mean its impossible or that pixijs is not made for it - we just didnt have a single case like that. You are the first one - make sure to share the experience so others will follow. Edited December 23, 2019 by ivan.popelyshev ZebraRoy 1 Quote Link to comment Share on other sites More sharing options...
ZebraRoy Posted December 24, 2019 Author Share Posted December 24, 2019 Thanks ivan, the example https://www.pixiplayground.com/#/edit/WHVpFCdiTiTe70dJvahf8 is exactly what i want jonforum 1 Quote Link to comment Share on other sites More sharing options...
ZebraRoy Posted December 24, 2019 Author Share Posted December 24, 2019 By using the render texture as buffer, I created this effect using this shadertoy buffer example ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 24, 2019 Share Posted December 24, 2019 OK, i edited it a bit and put here: https://github.com/pixijs/pixi.js/wiki/v5-Hacks#shadertoy-buffers ZebraRoy 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 24, 2019 Share Posted December 24, 2019 Do you want an invite to pixijs slack? ZebraRoy 1 Quote Link to comment Share on other sites More sharing options...
ZebraRoy Posted December 30, 2019 Author Share Posted December 30, 2019 On 12/24/2019 at 7:44 PM, ivan.popelyshev said: Do you want an invite to pixijs slack? It will be great, didn't notice there is a slack channel for pixi I will email to you then Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 30, 2019 Share Posted December 30, 2019 We keep it small. OK, invite should be in your mail. I'm a moder, i see everyone mails ZebraRoy 1 Quote Link to comment Share on other sites More sharing options...
komp Posted July 9, 2021 Share Posted July 9, 2021 Looks like someone edited this and removed the example. On 12/24/2019 at 5:52 AM, ivan.popelyshev said: OK, i edited it a bit and put here: https://github.com/pixijs/pixi.js/wiki/v5-Hacks#shadertoy-buffers Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 13, 2021 Share Posted July 13, 2021 @komp wanna try to make another one and save in codesandbox or in jsfiddle? Just edit so it works with pixi Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.