Image Texture as ShaderPass uniform

Has anyone been able to use an image as input to the fragment shader in a shaderpass? I want to blend two images and always have them be rendered full screen so it would be nice to pass them as uniforms, but nothing seems to be loading when I do that and make texture2Ds out of them.

Please provide your existing code as a live example on jsfiddle or codepen, then somebody will take a look and tell you what’s wrong. The issue might be with loading the image or the way you pass it to the shader or how the shader code is written, not updating the texture after it’s been loaded… hard to tell without seeing the code.

added one!

works for me when upgraded to the latest version:

Thanks for the reply! I’m not sure why the fiddle isn’t working for me^^ but I’m going to try switching out of writing in codepen and just make a project with the npm module if the version is the issue

It could be a CORS policy error as well

1 Like

it was i think. thanks!