plasma-arc / wgpu-shader.js
p3nGu1nZz's picture
move init for shaders
1cc5c8d
raw
history blame contribute delete
261 Bytes
// 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');
}