Jump to content

Backdrop filter in Pixi?


DanielW
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...