Uniform control flow webgpu

same code works in webgl ,error in webgpu. uniform control flow
https://playground.babylonjs.com/#DAC1WM#373
https://playground.babylonjs.com/#DAC1WM#372
what is the real reason

Basically you are sampling a texture from a non uniform control flow (inside an if statement)

cf Texture sampler and non uniform control flow

TLDR:

Add #define DISABLE_UNIFORMITY_ANALYSIS to your shader code, or find a way to sample the texture from a uniform control flow.