Taos API Reference
    Preparing search index...

    Class Shader

    Wraps a compiled WGSL shader module with its label.

    The underlying GPUShaderModule has no explicit destroy step; it is released when this object and any pipelines referencing it are dropped.

    Index

    Constructors

    Properties

    Constructors

    • Compiles the given WGSL source into a GPU shader module.

      Parameters

      • device: GPUDevice

        The WebGPU device used to compile the module.

      • code: string

        WGSL source code.

      • label: string

        Debug label attached to the module.

      Returns Shader

    Properties

    label: string