These are chat archives for pixijs/pixi.js

30th
Sep 2017
I am Neil
@clineil__twitter
Sep 30 2017 21:08
hi all, first time here. i've got a question about PIXI. is it ok to post here about it?
ᦖєgιт
@LegitSoulja
Sep 30 2017 21:09
Yes, help, questions, support.
I am Neil
@clineil__twitter
Sep 30 2017 21:11
cool, thanks. So, I'm trying to use a RenderTexture as a uniform for a custom filter, but im having trouble getting the shader to properly draw the texture. anyone have any tricks for this? i've tried using calculateSpriteMatrix as suggested in there "createFilters for v4"
i pass the rendertexture to the filter like this
...
freezeFrame : {
                type : "t",
                value: this.freezeFrame
            }, 
...
ᦖєgιт
@LegitSoulja
Sep 30 2017 21:14
What is the trouble? What exactly happens?
I am Neil
@clineil__twitter
Sep 30 2017 21:14
renderTex = PIXI.RenderTexture.create( window.innerWidth , window.innerHeight );
    rtSprite = new PIXI.Sprite( renderTex );
    stage.addChild( rtSprite );
   rtSprite.renderable = false;
but when i read the texture in the shader
it doesn't render the rendertexture
it just shows the original sprite i'm applying the filter to
ᦖєgιт
@LegitSoulja
Sep 30 2017 21:15
Ok that's more clarity. Properly drawn could me it drew, but incorrectly, or not drawn at all.
I am Neil
@clineil__twitter
Sep 30 2017 21:16
thanks for bearing with me
ᦖєgιт
@LegitSoulja
Sep 30 2017 21:16
Hm, I never used RenderTexture before to give you a positive reason why it's not working.
I've only used mesh and tile maps
I am Neil
@clineil__twitter
Sep 30 2017 21:17
for rendertexture? or for texture in a shader?
the work i'm doing with the rendertexture is appearing as i'd expect
if i change its sprite to renderable = true, i see what i'd expect to see there
but when i try to render that texture in my shader, i can't get it right at all
Ivan Popelyshev
@ivanpopelyshev
Sep 30 2017 23:28
need more info
also gitter is not the best place to ask, there's http://www.html5gamedevs.com/forum/15-pixijs/ and https://github.com/pixijs/pixi.js/issues
however, you can just create separate plugin, and not a filter: https://github.com/pixijs/pixi-plugin-example
that will remove the headache of filterArea/dimensions and all that stuff
to clarify more, i need more info on what do you actually want
Filters and shaders in pixi-v4 are pain.
i had to write several articles on them to understand tha twe REALLY need to make better api in v5 ;)