Hello!
First of all, thanks for creating Pixi and your work!
I've used a few times the filters and created a couple of custom filters for modifying a sprite, like blur for example.
Now, I am struggling to get a shader which uses a noise texture into pixi. The filter shouldn't be applied to any sprite originally. The shader example is in this shadertoy link:
https://www.shadertoy.com/view/4t2czR
After looking at the displacement filter and trying to port it the same way (and applying the filter to a graphic, rect) I didn't get any result.
How I can port this shader in to Pixi?
Sorry for the vague question, but I would like to have some directions.
Thanks!
If you dont have to apply it to any sprite, try this approach instead: https://github.com/pixijs/pixi-plugin-example/ Its a custom sprite renderer, it doesnt have filter limitations.
As for shaders, there's an article in wiki: https://github.com/pixijs/pixi.js/wiki/v4-Creating-Filters
If you make an almost working fiddle, @finscn or I will help you to debug it.
Thanks @ivanpopelyshev,
I've created a plugin using your example. Now it works, but I do have a couple of issues:
I can see a 'artifact/line' which I couldn't figure out what's the reason. I think it can be precision issue.
Please see the image, and you can see the line i'm referring to:

The main difference from the shader in shadertoy and now in the plugin is the use of texturelod, which I can't use in pixi as far as I understood.
I'm trying to get the plugin into fiddle meanwhile.
Thanks again!
do you use sampling at all? Is there any texture2D with coordinates that are not continuous? If so, disable mipmaps on that texture
texture.baseTexture.mipmap=false; // do it before first render
Actually, i think someone had a small lib for making plugins easier, lets see at html5gamedev forunm.
@yahiko00 I summon you!
^^^ Ask that guy, there's email in his profile
Hi there! I've encountered some pluginization issues with Pixi as well. I have done some research on this field but haven't gone to a viable lib though.
Here's the topic in the html5gamedev forum I've opened about my attempt: http://www.html5gamedevs.com/topic/31711-how-to-use-vertex-shader-with-pixijs/?tab=comments#comment-182485
That solved it @ivanpopelyshev! Thanks!
@yahiko00 I'm reading your post in html5gamedevs, it clarifies some doubts I had. I'm new into the shader world, so this helps.
Again, thanks a lot!
@yahiko00 I remember that you've made something to make that kind of plugins with a few lines of code. Where was it?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.