reduce a bit noise
This commit is contained in:
@@ -26,7 +26,7 @@ import useViewer from '../../store/use-viewer'
|
|||||||
// SSGI Parameters - adjust these to fine-tune global illumination and ambient occlusion
|
// SSGI Parameters - adjust these to fine-tune global illumination and ambient occlusion
|
||||||
export const SSGI_PARAMS = {
|
export const SSGI_PARAMS = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
sliceCount: 1,
|
sliceCount: 1,
|
||||||
stepCount: 8,
|
stepCount: 8,
|
||||||
radius: 1,
|
radius: 1,
|
||||||
expFactor: 1.5,
|
expFactor: 1.5,
|
||||||
@@ -104,9 +104,6 @@ const PostProcessingPasses = () => {
|
|||||||
scenePassColor.a,
|
scenePassColor.a,
|
||||||
)
|
)
|
||||||
|
|
||||||
// TRAA (Temporal Reprojection Anti-Aliasing)
|
|
||||||
const traaPass = traa(compositePass, scenePassDepth, scenePassVelocity, camera)
|
|
||||||
|
|
||||||
function generateSelectedOutlinePass() {
|
function generateSelectedOutlinePass() {
|
||||||
const edgeStrength = uniform(3)
|
const edgeStrength = uniform(3)
|
||||||
const edgeGlow = uniform(0)
|
const edgeGlow = uniform(0)
|
||||||
@@ -160,10 +157,13 @@ const PostProcessingPasses = () => {
|
|||||||
const selectedOutlinePass = generateSelectedOutlinePass()
|
const selectedOutlinePass = generateSelectedOutlinePass()
|
||||||
const hoverOutlinePass = generateHoverOutlinePass()
|
const hoverOutlinePass = generateHoverOutlinePass()
|
||||||
|
|
||||||
// Combine SSGI output with outlines
|
// Combine composite with outlines BEFORE applying TRAA
|
||||||
const finalOutput = SSGI_PARAMS.enabled
|
const compositeWithOutlines = SSGI_PARAMS.enabled
|
||||||
? selectedOutlinePass.add(hoverOutlinePass).add(traaPass)
|
? vec4(add(compositePass.rgb, selectedOutlinePass.add(hoverOutlinePass)), compositePass.a)
|
||||||
: selectedOutlinePass.add(hoverOutlinePass).add(scenePassColor)
|
: 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
|
postProcessing.outputNode = finalOutput
|
||||||
postProcessingRef.current = postProcessing
|
postProcessingRef.current = postProcessing
|
||||||
|
|||||||
Reference in New Issue
Block a user