• declareEntrypoint emits the WGSL to declare an entry point with the 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

    • arg: {
          body: string;
          name?: string;
          stage: ShaderStage;
      }

      arg specifies the optional entry point function name, the shader stage, and the body of the function, excluding any automatically generated return statements.

    Returns string

    the WGSL string for the entry point

Generated using TypeDoc