You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! I'm new to Pixi.
I'm trying to pass a texture to a Fragment shader, and I keep failing.
I want just a texture effect, so I copied the example from here:
https://pixijs.com/8.x/examples/filters-advanced/custom
My first question here is:
Why can this not be written as
?
Now I am trying to pass an extra texture to the fragment shader, like so:
I have tried
uniforms: { uExtraTexture: extraTexture, },
or adding
uniforms: { uExtraTexture: { value: extraTexture, type: 'sampler2D' }, },
But none of this seems to work. All the examples I can find use a different syntax, without the GlProgram constructor, like here:
https://stackoverflow.com/questions/64072964/passing-textures-to-fragment-shader-in-pixi-js
But changing to this syntax seems to break the custom shader example I am basing my code on:
https://pixijs.com/8.x/examples/filters-advanced/custom
This is currently my fragment shader (note I am not using uTexture at all, this is just to simplify, in the end I will need both):
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions