Constructing a material that uses a cube texture and a regular 2d texture, if the regular texture is not set results in errors for some browsers:
In Chromium the error GL_INVALID_OPERATION: Two textures of different types use the same sampler location is produced, and the material is not displayed.
In Safari the material is not displayed, but no errors are produced (silently fails).
In Firefox, it works as expected.
All browsers work as expected if the texture is set, or if two regular textures are used (i.e. one isn’t a cube texture.
Yes, I don’t think we can do anything about this, we don’t check that all inputs are provided to shaders (for performance sake): it’s up to the user to ensure all bindings are provided.
In WebGPU you will also get an error that a texture has not been bound.
Thanks for your response! I’ll try to mess around a bit and try to understand the reason behind the error before transforming the code to be runnable in the Playground.
Is it possible to create a texture which is not bound to a scene? I’d like to create a 1px static texture which I will send instead of null to the shader but I don’t want to add this texture to the scene. Or are textures strictly bound to a scene?