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

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.