Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce trailing effect for a larger scene #11

Open
SudevKiyadaTR opened this issue Mar 20, 2023 · 1 comment
Open

Reduce trailing effect for a larger scene #11

SudevKiyadaTR opened this issue Mar 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@SudevKiyadaTR
Copy link

Although, am not using any environment map for the scene, I quite love the way SSGI lifts up the scene. Is there a way to avoid the trailing effect at longer distance?

Am using this settings as option

options = {
  "distance": 1.5,
  "thickness": 20,
  "autoThickness": false,
  "maxRoughness": 1,
  "blend": 0.95,
  "denoiseIterations": 1,
  "denoiseKernel": 3,
  "denoiseDiffuse": 20,
  "denoiseSpecular": 0,
  "depthPhi": 14.022,
  "normalPhi": 0,
  "roughnessPhi": 0,
  "envBlur": 0.55,
  "importanceSampling": true,
  "directLightMultiplier": 1,
  "maxEnvLuminance": 50,
  "steps": 8,
  "refineSteps": 1,
  "spp": 3,
  "resolutionScale": 2,
  "missedRays": false
};
simulation_20Mar.mp4

Screenshot 2023-03-20 at 11 17 24 AM

@0beqz
Copy link
Owner

0beqz commented Mar 27, 2023

This seems to be an issue with the depthDistance and worldDistance being too low in the temporal reprojection pass (they are defined here: https://github.com/0beqz/realism-effects/blob/main/src/temporal-reproject/TemporalReprojectPass.js#L17). I think at that distance there are issues with precision so that the temporal reprojection pass constantly sees disocclusions there (due to a too high depth/distance difference between the current pixel and the reprojected pixel) which causes that flickering.

You can try to set depthDistance and worldDistance to higher values when passing the options when creating the SSGIEffect object. I'll look into it, maybe I can make distance play a role to account for the precision loss at higher distances.

@0beqz 0beqz added the bug Something isn't working label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants