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

TAARenderPass: Pass over-brightens scene, shows occasional black frames #24318

Closed
donmccurdy opened this issue Jul 6, 2022 · 3 comments · Fixed by #26179 or #26199
Closed

TAARenderPass: Pass over-brightens scene, shows occasional black frames #24318

donmccurdy opened this issue Jul 6, 2022 · 3 comments · Fixed by #26179 or #26199

Comments

@donmccurdy
Copy link
Collaborator

donmccurdy commented Jul 6, 2022

Describe the bug

When using TAARenderPass, certain valid settings result in incorrect behavior:

  • scene.background — any non-black background will cause the final scene to over-brighten during TAA accumulation
  • pass.sampleLevel — any non-zero level will cause a single-frame flash of black when the accumulation phase begins

To Reproduce

Steps to reproduce the behavior:

  1. Open webgl_postprocessing_taa locally
  2. Add a background color like scene.background = new THREE.Color( 0xEE5555 );
  3. Increase TAASampleLevel (any level > 0)

Observe (1) the scene brightens when it stops moving and begins accumulating, and (2) the scene flashes to black for a single frame at that time. It may be easier to see the flash when the background is kept black.

Expected behavior

TAARenderPass should be compatible with non-black scene backgrounds, and should not show a black frame while accumulating.

Screenshots

If applicable, add screenshots to help explain your problem (drag and drop the image).

Platform:

  • Device: Desktop
  • OS: macOS 12.4
  • Browser: Chrome 103.0.5060.53
  • Three.js version: r142
@donmccurdy
Copy link
Collaborator Author

@Mugen87 I believe that #26179 has considerably improved the situation, but I'm still seeing shifts in the background color with the use of TAARenderPass. The problem is subtle when TAA sample level is 0, and very obvious with higher sample levels.

The example included with #24271 remains very illustrative. Currently the effect stack here is RenderPass → TAARenderPass → OutputPass. If we put TAARenderPass last, the color management is clearly wrong, but I'm not sure if that's allowed usage.

@Mugen87 Mugen87 reopened this Jun 5, 2023
@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 5, 2023

The problem is subtle when TAA sample level is 0, and very obvious with higher sample levels.

Thanks for the heads-up. I'll check the implementation again tomorrow 👍 .

@donmccurdy
Copy link
Collaborator Author

@Mugen87 looking great now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants