mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Add camera setup to WebGPU project
This commit is contained in:
5
TODO.txt
5
TODO.txt
@@ -1,5 +1,10 @@
|
||||
TODO:
|
||||
|
||||
Add mirror effect to WebGPU
|
||||
|
||||
Reformulate the basis
|
||||
https://buf.com/films/the-matrix-resurrections
|
||||
|
||||
Resurrections
|
||||
Support random glyph order
|
||||
Support annomaly streaks
|
||||
|
||||
@@ -8,6 +8,7 @@ import makeStripePass from "./stripePass.js";
|
||||
import makeImagePass from "./imagePass.js";
|
||||
import makeResurrectionPass from "./resurrectionPass.js";
|
||||
import makeEndPass from "./endPass.js";
|
||||
import { setupCamera } from "../camera.js";
|
||||
|
||||
const loadJS = (src) =>
|
||||
new Promise((resolve, reject) => {
|
||||
@@ -34,6 +35,10 @@ const effects = {
|
||||
export default async (canvas, config) => {
|
||||
await loadJS("lib/gl-matrix.js");
|
||||
|
||||
if (config.useCamera) {
|
||||
await setupCamera();
|
||||
}
|
||||
|
||||
const canvasFormat = navigator.gpu.getPreferredCanvasFormat();
|
||||
const adapter = await navigator.gpu.requestAdapter();
|
||||
const device = await adapter.requestDevice();
|
||||
|
||||
Reference in New Issue
Block a user