DanielW Posted November 16, 2017 Share Posted November 16, 2017 Hello, I'm investigating some web-gl solutions that would allow an effect similar to Safari's CSS backdrop filter. I know Pixi supports creating custom filters, but this filter is usually a little bit trickier as it involves consideration of the texture data behind the actual object/node that has the filter. e.g. https://webkit.org/demos/backdrop-filter/ Curious if anyone has investigated this with Pixi. Is this something that can be reasonably accomplished with Pixi? Rough sketches of approach would be appreciated, assuming someone hasn't already cracked this nut. Thanks! -D Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 16, 2017 Share Posted November 16, 2017 > it involves consideration of the texture data behind the actual object/node that has the filter. e.g. https://github.com/pixijs/pixi-picture can do that. The only problem is that it'll use readPixels which is EXTREMELY SLOW. You have to put all the stage into AlphaFilter (aka VoidFilter), that way those renderers will be able to take image behind filter with async operation copyTexImage2d or something like that. I implemented OVERLAY in that plugin, you can make backdrop with it if you adjust shader. 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.