mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Renamed ripples pass to mirror pass
This commit is contained in:
@@ -7,7 +7,7 @@ import makeStripePass from "./stripePass.js";
|
||||
import makeImagePass from "./imagePass.js";
|
||||
import makeResurrectionPass from "./resurrectionPass.js";
|
||||
import makeQuiltPass from "./quiltPass.js";
|
||||
import makeRipplesPass from "./ripplesPass.js";
|
||||
import makeMirrorPass from "./mirrorPass.js";
|
||||
import getLKG from "./lkgHelper.js";
|
||||
import { setupCamera } from "../camera.js";
|
||||
|
||||
@@ -22,7 +22,7 @@ const effects = {
|
||||
image: makeImagePass,
|
||||
resurrection: makeResurrectionPass,
|
||||
resurrections: makeResurrectionPass,
|
||||
ripples: makeRipplesPass,
|
||||
mirror: makeMirrorPass,
|
||||
};
|
||||
|
||||
const dimensions = { width: 1, height: 1 };
|
||||
|
||||
@@ -21,7 +21,7 @@ export default ({ regl, config }, inputs) => {
|
||||
start = Date.now();
|
||||
|
||||
const output = makePassFBO(regl, config.useHalfFloat);
|
||||
const ripplesPassFrag = loadText("shaders/glsl/ripplesPass.frag.glsl");
|
||||
const mirrorPassFrag = loadText("shaders/glsl/mirrorPass.frag.glsl");
|
||||
const render = regl({
|
||||
frag: regl.prop("frag"),
|
||||
uniforms: {
|
||||
@@ -39,14 +39,14 @@ export default ({ regl, config }, inputs) => {
|
||||
{
|
||||
primary: output,
|
||||
},
|
||||
Promise.all([ripplesPassFrag.loaded]),
|
||||
Promise.all([mirrorPassFrag.loaded]),
|
||||
(w, h) => {
|
||||
output.resize(w, h);
|
||||
aspectRatio = w / h;
|
||||
},
|
||||
() => {
|
||||
cameraTex(cameraCanvas);
|
||||
render({ frag: ripplesPassFrag.text() });
|
||||
render({ frag: mirrorPassFrag.text() });
|
||||
}
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user