File size: 261 Bytes
46ec188
 
 
 
 
1cc5c8d
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
// wgpu-shaders.js

export async function fetchShaderCode(url) {
    const response = await fetch(url);
    return await response.text();
}

export async function InitializeShaders(state) {
    state.webgpu.shaderCode = await fetchShaderCode('shaders.wgsl');
}