shader-web-background
shader-web-background copied to clipboard
Array uniforms?
My shader has:
uniform vec2 iThingsPos[8];
And in the js I do:
shaderWebBackground.shade({
canvas: ref.current!,
shaders: {
image: {
uniforms: {
iThingsPos: (gl, loc, ctx) => gl.uniform2fv(loc, new Float32(...))
},
},
},
});
I'm getting this runtime error
shaderWebBackground.ConfigError: No configuration for uniform "iThingsPos[0]" defined in shader "image"
Is there a trick for passing array uniforms with this library?
Thanks for open sourcing this btw, great little library!