Represents a material with vertex and fragment shaders.

Constructors

  • Creates a new Material.

    Parameters

    • device: GPUDevice

      The GPUDevice to use for creating shader modules.

    • shader: IMaterialShader

      The IMaterialShader object containing the shader code.

    Returns Material

Properties

device: GPUDevice

The GPUDevice to use for creating shader modules.

fragmentShaderModule: GPUShaderModule

The IMaterialShader object containing the shader code.

vertexShaderModule: GPUShaderModule