Im trying to write a custom shader, but for some reason it throws an error when trying to calculate the min of 2 vec3.
Error:
Failed to execute ‘uniform3fv’ on ‘WebGL2RenderingContext’: Overload resolution failed.
Here is my code:
void main() {
gl_FragColor = texture2D(uColorBuffer, vUv0);
vec3 t0 = (uBoundsMin - uRayOrigin) * uRayDir;
vec3 t1 = (uBoundsMax - uRayOrigin) * uRayDir;
vec3 tmin = min(t0, t1); // THIS THROWS!
gl_FragColor.rgb = gl_FragColor.rgb;
}