mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Switching the default renderer to regl for now, since some folks are seeing issues with the WebGPU renderer and I'm actively investigating its "bloom issues" (which seem to involve bloomStrength and texture/sampler differences)
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
---
|
---
|
||||||
### about
|
### about
|
||||||
|
|
||||||
This project is a web implementation of the raining green code seen in the *Matrix* franchise. It's built right on top of the upcoming graphics API [WebGPU](https://github.com/gpuweb/gpuweb), but falls back to the functional WebGL wrapper, [REGL](https://regl.party); its previous Three.js version is maintained in a separate branch.
|
This project is a web implementation of the raining green code seen in the *Matrix* franchise. It's built right on top of the functional WebGL wrapper, [REGL](https://regl.party), with beta support for the upcoming graphics API [WebGPU](https://github.com/gpuweb/gpuweb); its previous Three.js version is maintained in a separate branch.
|
||||||
|
|
||||||
---
|
---
|
||||||
### goals
|
### goals
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ const defaults = {
|
|||||||
slant: 0, // The angle at which rain falls; the orientation of the glyph grid
|
slant: 0, // The angle at which rain falls; the orientation of the glyph grid
|
||||||
resolution: 0.75, // An overall scale multiplier
|
resolution: 0.75, // An overall scale multiplier
|
||||||
useHalfFloat: false,
|
useHalfFloat: false,
|
||||||
renderer: "webgpu", // The preferred web graphics API
|
renderer: "regl", // The preferred web graphics API
|
||||||
isometric: false,
|
isometric: false,
|
||||||
useHoloplay: false,
|
useHoloplay: false,
|
||||||
loops: false,
|
loops: false,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const supportsWebGPU = async () => {
|
|||||||
document.body.onload = async () => {
|
document.body.onload = async () => {
|
||||||
const urlParams = Object.fromEntries(new URLSearchParams(window.location.search).entries());
|
const urlParams = Object.fromEntries(new URLSearchParams(window.location.search).entries());
|
||||||
const config = makeConfig(urlParams);
|
const config = makeConfig(urlParams);
|
||||||
const useREGL = !(await supportsWebGPU()) || ["webgl", "regl"].includes(config.renderer?.toLowerCase());
|
const useWebGPU = (await supportsWebGPU()) && ["webgpu"].includes(config.renderer?.toLowerCase());
|
||||||
const solution = import(`./${useREGL ? "regl" : "webgpu"}/main.js`);
|
const solution = import(`./${useWebGPU ? "webgpu" : "regl"}/main.js`);
|
||||||
(await solution).default(canvas, config);
|
(await solution).default(canvas, config);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user