From 6f4ba928629ab2384145847371d7ffa064465197 Mon Sep 17 00:00:00 2001 From: wass08 Date: Mon, 16 Feb 2026 08:43:04 +0900 Subject: [PATCH] reduce a bit noise --- .../src/components/viewer/post-processing.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/viewer/src/components/viewer/post-processing.tsx b/packages/viewer/src/components/viewer/post-processing.tsx index 65a4fe41..c0310b27 100644 --- a/packages/viewer/src/components/viewer/post-processing.tsx +++ b/packages/viewer/src/components/viewer/post-processing.tsx @@ -26,7 +26,7 @@ import useViewer from '../../store/use-viewer' // SSGI Parameters - adjust these to fine-tune global illumination and ambient occlusion export const SSGI_PARAMS = { enabled: true, - sliceCount: 1, + sliceCount: 1, stepCount: 8, radius: 1, expFactor: 1.5, @@ -104,9 +104,6 @@ const PostProcessingPasses = () => { scenePassColor.a, ) - // TRAA (Temporal Reprojection Anti-Aliasing) - const traaPass = traa(compositePass, scenePassDepth, scenePassVelocity, camera) - function generateSelectedOutlinePass() { const edgeStrength = uniform(3) const edgeGlow = uniform(0) @@ -160,10 +157,13 @@ const PostProcessingPasses = () => { const selectedOutlinePass = generateSelectedOutlinePass() const hoverOutlinePass = generateHoverOutlinePass() - // Combine SSGI output with outlines - const finalOutput = SSGI_PARAMS.enabled - ? selectedOutlinePass.add(hoverOutlinePass).add(traaPass) - : selectedOutlinePass.add(hoverOutlinePass).add(scenePassColor) + // Combine composite with outlines BEFORE applying TRAA + const compositeWithOutlines = SSGI_PARAMS.enabled + ? vec4(add(compositePass.rgb, selectedOutlinePass.add(hoverOutlinePass)), compositePass.a) + : vec4(add(scenePassColor.rgb, selectedOutlinePass.add(hoverOutlinePass)), scenePassColor.a) + + // TRAA (Temporal Reprojection Anti-Aliasing) - applied AFTER combining everything + const finalOutput = traa(compositeWithOutlines, scenePassDepth, scenePassVelocity, camera) postProcessing.outputNode = finalOutput postProcessingRef.current = postProcessing