Sign in to follow this  
wonlab

How to save as a texture that applied shader?

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.

Share this post


Link to post
Share on other sites

 I am worrying about that when render method call, the texture will calculate on shader every time.

I just want to make static texture that calculated texture.

should I use canvas api?

thanks.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.