diff --git a/scenes/webgl-comparison/main.js b/scenes/webgl-comparison/main.js index 5b810ee..9e94710 100644 --- a/scenes/webgl-comparison/main.js +++ b/scenes/webgl-comparison/main.js @@ -154,6 +154,7 @@ function initRenderer(renderer) { renderer.toneMapping = THREE.ACESFilmicToneMapping; renderer.toneMappingExposure = 1.5; renderer.renderWhenOffFocus = false; + renderer.bounces = 3; } function unloadRenderer(renderer) { diff --git a/src/RayTracingRenderer.js b/src/RayTracingRenderer.js index 626e98a..24fa396 100644 --- a/src/RayTracingRenderer.js +++ b/src/RayTracingRenderer.js @@ -31,7 +31,7 @@ export function RayTracingRenderer(params = {}) { let pixelRatio = 1; const module = { - bounces: 3, + bounces: 2, domElement: canvas, maxHardwareUsage: false, needsUpdate: true, diff --git a/src/renderer/RenderingPipeline.js b/src/renderer/RenderingPipeline.js index 572fddd..1b8ba35 100644 --- a/src/renderer/RenderingPipeline.js +++ b/src/renderer/RenderingPipeline.js @@ -18,11 +18,10 @@ export function makeRenderingPipeline({ bounces, // number of global illumination bounces }) { - const reprojectDecay = 0.975; - const maxReprojectedSamples = Math.round(reprojectDecay / (1 - reprojectDecay)); + const maxReprojectedSamples = 20; // how many samples to render with uniform noise before switching to stratified noise - const numUniformSamples = 6; + const numUniformSamples = 4; // how many partitions of stratified noise should be created // higher number results in faster convergence over time, but with lower quality initial samples @@ -231,7 +230,7 @@ export function makeRenderingPipeline({ reprojectBuffer.bind(); gl.viewport(0, 0, previewWidth, previewHeight); reprojectPass.draw({ - blendAmount: reprojectDecay, + blendAmount: 1.0, light: hdrBuffer.attachments[rayTracePass.outputLocs.light], position: hdrBuffer.attachments[rayTracePass.outputLocs.position], textureScale: previewScale,