mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-17 22:09:28 -07:00
Separated color passes into separate modules.
Moved main JS into its own module. Main module now builds passes into a pipeline, based on the value of config.effect. The passes no longer make stubs when they're not meant to be active. Asset loading has been moved into the passes, which resolve their ready promise when they've finished loading.
This commit is contained in:
@@ -10,11 +10,7 @@ const levelStrengths = Array(pyramidHeight)
|
||||
)
|
||||
.reverse();
|
||||
|
||||
export default (regl, config, input) => {
|
||||
if (!config.performBloom) {
|
||||
return makePass(input, null, null);
|
||||
}
|
||||
|
||||
export default (regl, { bloomSize }, input) => {
|
||||
const highPassPyramid = makePyramid(regl, pyramidHeight);
|
||||
const hBlurPyramid = makePyramid(regl, pyramidHeight);
|
||||
const vBlurPyramid = makePyramid(regl, pyramidHeight);
|
||||
@@ -102,7 +98,7 @@ export default (regl, config, input) => {
|
||||
framebuffer: output
|
||||
});
|
||||
|
||||
const scale = config.bloomSize;
|
||||
const scale = bloomSize;
|
||||
|
||||
return makePass(
|
||||
output,
|
||||
|
||||
Reference in New Issue
Block a user