Disable shadowmapping on WebGL

This commit is contained in:
Lauri Räsänen 2023-11-05 02:27:38 +02:00
parent 2616b2f5c9
commit ccaf9261cc
7 changed files with 67 additions and 45 deletions

View file

@ -12,12 +12,14 @@
padding: 0;
background: black;
}
canvas {
background-color: black;
display: block;
width: 100vw;
height: 100vh;
}
#loading {
color: white;
position: absolute;
@ -29,14 +31,20 @@
</head>
<body>
<h1 id="loading">Loading...</h1>
<script type="module">
import init from "./pkg/wgpu_renderer.js";
<h1 id="loading">Loading...</h1>
<script type="module">
import init from "./pkg/wgpu_renderer.js";
// TODO: still on GL, uncomment once WebGPU works
// if (!navigator.gpu) {
// document.getElementById("loading").innerText = "WebGPU not supported :(";
// } else {
init().then(() => {
console.log("WASM Loaded");
document.getElementById("loading")?.remove();
document.getElementById("loading").remove();
});
</script>
// }
</script>
</body>
</html>