LightmapTexture issue of material in WebGPU

mat.lightmapTexture = new BABYLON.Texture("textures/grass.png", scene);

This code will cause a compilation error in WebGPU.

Error while parsing WGSL: :386:39 error: unresolved value 'vLightmapInfos'
lightmapColor=vec4f(lightmapColor.rgb*vLightmapInfos.y,lightmapColor.a);

It seems that “vLightmapInfos” is missing a “uniforms” prefix. It should be “uniforms.vLightmapInfos.y”.

1 Like

You’re right, here’s the fix:

1 Like