My issue is that Texel fetch is not working, and neither is reading from 2d texture arrays. I’m using the webGPU engine, but the particular shader I’m working in is GLSL. I’ve been creating the texture with these settings:
samplingMode: Texture.NEAREST_SAMPLINGMODE
samplingMode: Constants.TEXTURE_NEAREST_NEAREST
noMipmapOrOptions: true
When I make the call to read from the texture, I’m always using the 0 level for mipmap.
I’m not really sure where I’m going wrong here. Here’s an example playground using the 2d texture array:
webGL2: Babylon.js Playground
webGPU: https://playground.babylonjs.com/#XEVUD9#184
You’ll see in the webgpu version that the cube is black - and it doesn’t matter if you hardcode the mipmap level value to 0.0
Also note that for the second playground I set the texture format to BABYLON.Engine.TEXTUREFORMAT_RGBA