These are chat archives for pixijs/pixi.js

8th
Feb 2016
Matt Ostgard
@MattOstgard
Feb 08 2016 20:20
Hmm. I want to use 2 jpegs, 1 will be used as RGB the other as transparency. They are stored as a sprite sheet and I want to just use the same texture coordinates that are used in the sprite sheet for both images. Filter texture coords map to 0-1 so that won't work (alpha channel appears as entire sprite sheet instead of individual sprite). So using a shader instead how do I pass the alpha texture off as an additional uniform?
Ivan Popelyshev
@ivanpopelyshev
Feb 08 2016 20:26
needs special shader
yeah, 2 jpegs is standart thing
you have to make your own class that extends Sprite and have second texture
and in renderWebGL() you have to assign second texture to your shader's uniform
then call SpriteRenderer, it will do the job :)
Matt Ostgard
@MattOstgard
Feb 08 2016 20:28
awesome thanks
Ivan Popelyshev
@ivanpopelyshev
Feb 08 2016 20:29
if you have github or other stuff i can help
cause i need that stuff too for ETC1 compression
Matt Ostgard
@MattOstgard
Feb 08 2016 20:29
Not yet but I am planning on making it a plugin or something everyone else can learn from