uniform highp usampler2DArray someTexture;
...
uvec4 rgba = texture(someTexture, vec3(0, 0, 0));
...
> Error: 'sampler2DArray' : sampler-constructor first argument must match type and dimensionality of constructor type
uniform highp usampler2DArray ${textureParamName};
float getSomeValuesFromTexture(ivec3 coord) {
// HOT FIX FOR WEBGPU
// We change the sampler type, because the standard handler textureParamName does not inherit the type ([U]sampler2DArray)
#if defined(WEBGPU)
uvec4 rgba = texelFetch(usampler2DArray(${textureParamName}_texture, ${textureParamName}_sampler), coord, 0);
#else
uvec4 rgba = texelFetch(${textureParamName}, coord, 0);
#endif
uint value = rgba.r + rgba.g;
return float(value) / 65535.0;
}
Replace it and you will see the error, this is only for WebGPU.