7 lines
218 B
JavaScript
7 lines
218 B
JavaScript
|
|
export async function loadShader(url) {
|
||
|
|
const response = await fetch(url);
|
||
|
|
if (!response.ok) {
|
||
|
|
throw new Error(`Failed to load shader: ${response.statusText}`);
|
||
|
|
}
|
||
|
|
return await response.text();
|
||
|
|
}
|