code with its comments removed. Babylon's WGSL preprocessor splits the
source at every ;, comments included, so a // comment holding a
semicolon becomes a line of nonsense and the shader fails to compile
("expected ':' for struct member"). The walk's comments have semicolons,
so anything given to ComputeShader as traceModuleWgsl() plus a kernel
goes through this (createTraceComputeShader does it). WGSL has no
strings, so removing // and block comments is safe.
codewith its comments removed. Babylon's WGSL preprocessor splits the source at every;, comments included, so a//comment holding a semicolon becomes a line of nonsense and the shader fails to compile ("expected ':' for struct member"). The walk's comments have semicolons, so anything given toComputeShaderastraceModuleWgsl()plus a kernel goes through this (createTraceComputeShader does it). WGSL has no strings, so removing//and block comments is safe.