Added WebGPU support and added caching to the WebGPU version.

This commit is contained in:
Rezmason
2025-05-05 19:07:36 -07:00
parent 664f484723
commit f3cd449c7d
13 changed files with 129 additions and 84 deletions

View File

@@ -6,6 +6,7 @@ import {
makeBindGroup,
makePass,
} from "./utils.js";
import mirrorPassShader from "../../shaders/wgsl/mirrorPass.wgsl";
let start;
const numTouches = 5;
@@ -25,7 +26,7 @@ window.onclick = (e) => {
};
export default ({ config, device, cameraTex, cameraAspectRatio, timeBuffer }) => {
const assets = [loadShader(device, "shaders/wgsl/mirrorPass.wgsl")];
const assets = [loadShader(device, mirrorPassShader)];
const linearSampler = device.createSampler({
magFilter: "linear",