@pmndrs/bvh
    Preparing search index...

    Function wgslForBabylon

    • 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.

      Parameters

      • code: string

      Returns string