askariwa Posted May 15, 2015 Share Posted May 15, 2015 Is it possible to apply a shader (filter) to a sprìte, get the resulting image and "send it again to the shader" , ie apply the filter to the new image ?I have already asked this question at the Phaser forum (here) but i have got no answer, maybe it can't be done ? Quote Link to comment Share on other sites More sharing options...
xerver Posted May 15, 2015 Share Posted May 15, 2015 Yes, this is actually really easy in Pixi.js v3. Filters are applied through their ".applyFilter()" method which lets the shader apply the FBOs however it wants. For example, the bloom filter creates an FBO (renderTarget) then applies a couple different filters in a couple different ways with a couple different blend modes before finally returning its object. There are other examples of filters doing this as well, but this is probably the most complex example. ponk and askariwa 2 Quote Link to comment Share on other sites More sharing options...
askariwa Posted May 16, 2015 Author Share Posted May 16, 2015 Yes, this is actually really easy in Pixi.js v3. Filters are applied through their ".applyFilter()" method which lets the shader apply the FBOs however it wants. For example, the bloom filter creates an FBO (renderTarget) then applies a couple different filters in a couple different ways with a couple different blend modes before finally returning its object. There are other examples of filters doing this as well, but this is probably the most complex example. Thank you very much for your answer (and the good news ).I'll go to study the example right away. 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.