mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-17 05:49:30 -07:00
A little reorganization of methods in the passes.
This commit is contained in:
@@ -30,6 +30,10 @@ export default (context, getInputs) => {
|
||||
const bgURL = "bgURL" in config ? config.bgURL : defaultBGURL;
|
||||
const assets = [loadTexture(device, bgURL), loadShader(device, "shaders/wgsl/imagePass.wgsl")];
|
||||
|
||||
const getOutputs = () => ({
|
||||
primary: output,
|
||||
});
|
||||
|
||||
const ready = (async () => {
|
||||
const [bgTex, imageShader] = await Promise.all(assets);
|
||||
|
||||
@@ -57,10 +61,6 @@ export default (context, getInputs) => {
|
||||
output = makePassFBO(device, width, height, canvasFormat);
|
||||
};
|
||||
|
||||
const getOutputs = () => ({
|
||||
primary: output,
|
||||
});
|
||||
|
||||
const execute = (encoder) => {
|
||||
const inputs = getInputs();
|
||||
const tex = inputs.primary;
|
||||
|
||||
Reference in New Issue
Block a user