Hello BJS world.
I’m getting an error when trying to define a sampler2D variable texture1
inside a fragment shader. It seems to work with WebGL, but when I switch to WebGPU I get the error and nothing renders. PG here.
Any clue on why this happens? maybe I’m missing some simple docs for writing custom GLSL shaders for WebGPU? Any advice on facing this kind of challenges will be more than appreciated.
The error from Chrome’s console:
BJS - [17:14:47]: Sampler “texture1Sampler” could not be bound. entry={“binding”:2,“visibility”:2,“sampler”:{“type”:“filtering”}}, materialContext={“uniqueId”:1,“updateId”:0,“textureState”:0,“samplers”:{},“textures”:{},“isDirty”:false,“_numFloatOrDepthTextures”:0,“_numExternalTextures”:0}
Thanks in advance.