• declareEntrypoint emits the WGSL to declare an entry point with the given name, stage and body. The generated function will have an appropriate return type and return statement, so that body does not have to change between stage.

    Parameters

    • name: string

      the entry point function name

    • stage: ShaderStage

      the entry point stage

    • body: string

      the body of the function (excluding any automatically suffixed return statements)

    Returns string

    the WGSL string for the entry point

Generated using TypeDoc