j.c Posted June 11, 2018 Share Posted June 11, 2018 see demo: https://jsfiddle.net/jscqzty0/15/ https://www.shadertoy.com/view/MdVBDh these 2 shader actually has the same code, but PixiJS one does not work properly, what do I miss in the code? Quote Link to comment Share on other sites More sharing options...
Exca Posted June 11, 2018 Share Posted June 11, 2018 The vTextureCoord is not in range [0,1]. See https://github.com/pixijs/pixi.js/wiki/v4-Creating-Filters for more details and solutions. Or I can modify an example some time later if that document doesn't help. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 11, 2018 Share Posted June 11, 2018 also, default padding. set filter padding to zero. Quote Link to comment Share on other sites More sharing options...
j.c Posted June 12, 2018 Author Share Posted June 12, 2018 it's done!! thanks guys @Exca @ivan.popelyshev https://jsfiddle.net/jscqzty0/35/ I figured out what filterArea does. it's used for user to customize the applying area of the filter. considerate engine! jonforum 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 12, 2018 Share Posted June 12, 2018 it automatically calculates object bounds if you dont specify filterArea. It takes power-of-two size temporary render texture to draw container in, and then applies shader to a part that is corresponding to filter area.. However, if filterArea is whole screen, screen-size buffer is used and you can omit those coordinate-related tricks, like in pixi-v3 and most of 2d webgl renderers. 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.