(device: GPUDevice, code: string, label?: string)
| 107 | * Creates a shader module from WGSL source. |
| 108 | */ |
| 109 | export function createShaderModule(device: GPUDevice, code: string, label?: string): GPUShaderModule { |
| 110 | if (typeof code !== 'string' || code.length === 0) { |
| 111 | throw new Error('createShaderModule(code): WGSL code must be a non-empty string.'); |
| 112 | } |
| 113 | return device.createShaderModule({ code, label }); |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * Creates a render pipeline with reduced boilerplate and sensible defaults. |
no outgoing calls
no test coverage detected