Moving bloom strength math to the combine steps, and fixing a redundant multiply issue in the REGL based renderer

This commit is contained in:
Rezmason
2022-10-04 21:53:53 -07:00
parent 507f907096
commit 3843dd90d1
17 changed files with 28 additions and 46 deletions

View File

@@ -20,7 +20,7 @@ const makePyramid = (device, size, pyramidHeight) =>
.map((_, index) =>
makeComputeTarget(
device,
size.map((x) => Math.floor(x * 2 ** -(index + 1)))
size.map((x) => Math.floor(x * 2 ** -index))
)
);
@@ -97,7 +97,7 @@ export default ({ config, device }) => {
vBlurBuffer = makeUniformBuffer(device, blurUniforms, { bloomRadius, direction: [0, 1] });
const combineUniforms = structs.from(combineShader.code).Config;
combineBuffer = makeUniformBuffer(device, combineUniforms, { pyramidHeight });
combineBuffer = makeUniformBuffer(device, combineUniforms, { pyramidHeight, bloomStrength });
})();
const build = (screenSize, inputs) => {