Skip to content

ShaderModuleDescriptor

data class ShaderModuleDescriptor(
    val code: String, 
    val compilationHints: List<GPUShaderModuleCompilationHint> = emptyList(), 
    val label: String = ""
) : GPUShaderModuleDescriptor
Describes the shader code and compilation options used to create a GPUShaderModule.

Constructors

ShaderModuleDescriptor

constructor(
    code: String, 
    compilationHints: List<GPUShaderModuleCompilationHint> = emptyList(), 
    label: String = ""
)

Properties

code

open override val code: String
The WGSL source code for the shader module. See [GPUShaderModuleDescriptor.code in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpushadermoduledescriptor-code).

compilationHints

open override val compilationHints: List<GPUShaderModuleCompilationHint>
A list of GPUShaderModuleCompilationHints. Any hint provided by an application should contain information about one entry point of a pipeline that will eventually be created from the entry point.

label

open override val label: String