mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-23 08:09:31 -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 makeImagePass from "./imagePass.js";
|
||||||
import makeResurrectionPass from "./resurrectionPass.js";
|
import makeResurrectionPass from "./resurrectionPass.js";
|
||||||
import makeQuiltPass from "./quiltPass.js";
|
import makeQuiltPass from "./quiltPass.js";
|
||||||
import makeRipplesPass from "./ripplesPass.js";
|
import makeMirrorPass from "./mirrorPass.js";
|
||||||
import getLKG from "./lkgHelper.js";
|
import getLKG from "./lkgHelper.js";
|
||||||
import { setupCamera } from "../camera.js";
|
import { setupCamera } from "../camera.js";
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ const effects = {
|
|||||||
image: makeImagePass,
|
image: makeImagePass,
|
||||||
resurrection: makeResurrectionPass,
|
resurrection: makeResurrectionPass,
|
||||||
resurrections: makeResurrectionPass,
|
resurrections: makeResurrectionPass,
|
||||||
ripples: makeRipplesPass,
|
mirror: makeMirrorPass,
|
||||||
};
|
};
|
||||||
|
|
||||||
const dimensions = { width: 1, height: 1 };
|
const dimensions = { width: 1, height: 1 };
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default ({ regl, config }, inputs) => {
|
|||||||
start = Date.now();
|
start = Date.now();
|
||||||
|
|
||||||
const output = makePassFBO(regl, config.useHalfFloat);
|
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({
|
const render = regl({
|
||||||
frag: regl.prop("frag"),
|
frag: regl.prop("frag"),
|
||||||
uniforms: {
|
uniforms: {
|
||||||
@@ -39,14 +39,14 @@ export default ({ regl, config }, inputs) => {
|
|||||||
{
|
{
|
||||||
primary: output,
|
primary: output,
|
||||||
},
|
},
|
||||||
Promise.all([ripplesPassFrag.loaded]),
|
Promise.all([mirrorPassFrag.loaded]),
|
||||||
(w, h) => {
|
(w, h) => {
|
||||||
output.resize(w, h);
|
output.resize(w, h);
|
||||||
aspectRatio = w / h;
|
aspectRatio = w / h;
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
cameraTex(cameraCanvas);
|
cameraTex(cameraCanvas);
|
||||||
render({ frag: ripplesPassFrag.text() });
|
render({ frag: mirrorPassFrag.text() });
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user