Jump to content

How to save as a texture that applied shader?


wonlab
 Share

Recommended Posts

https://pixijs.io/examples/#/basics/render-texture.js 

https://pixijs.io/examples/#/filters/filter-mouse.js

This question is asked too often and people dont like to search it, so my comment is very small : renderTexture+filters. There's no complete guide on it, you have to experiment with this thing and stumble across bugs :)

There's big article on how to avoid problems with filters: https://github.com/pixijs/pixi.js/wiki/v4-Creating-Filters

Yes, its not a newbie material, prepare to suffer.

Link to comment
Share on other sites

you should call render with your supposed container with filter as first parameter and renderTexture as second. Call it one time when you construct the texture.

Yeah, if you know how to do something in canvas 2d context, you can do that and use "Texture.fromCanvas()". If you need webgl api, its betetr to use pixi filters, or you'll have problems with wrong states of renderers.

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...