Skip to content

SSAA / TAA postprocessing makes scene darker #1601

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

Closed
Russo-creation opened this issue Aug 4, 2023 · 9 comments
Closed

SSAA / TAA postprocessing makes scene darker #1601

Russo-creation opened this issue Aug 4, 2023 · 9 comments
Labels
bug Something isn't working Stale Inactive issue three-stdlib Fixed in three-stdlib

Comments

@Russo-creation
Copy link

Hi,

I tried to add SSAA and TAA to the project but I noticed that the more Sample Level I'm setting the screen is getting darker - this happens with the fresh version of r3f. in three.js examples it works good TAA https://threejs.org/examples/webgl_postprocessing_taa.html and SSAA https://threejs.org/examples/?q=ssaa#webgl_postprocessing_ssaa

Here is the codesanbox fiber 8.13.3: https://codesandbox.io/s/enter-portals-forked-5vpqtn?file=/src/postProccesing.js:456-457
image

and to compare code sandbox fiber 8.12.0: https://codesandbox.io/s/blazing-fire-mz5fgs?file=/src/postProccesing.js:531-532
image

@CodyJasonBennett
Copy link
Member

That is coming from Drei which you can find by updating Drei in the latter demo. R3F does not change how three.js works. I found that exactly version 9.65.0 and up could reproduce this behavior on CSB, but I'd try offline since they don't handle dependencies well to begin with.

@CodyJasonBennett CodyJasonBennett transferred this issue from pmndrs/react-three-fiber Aug 4, 2023
@Russo-creation
Copy link
Author

Russo-creation commented Aug 4, 2023

hmm... from what I see in codesanbox it looks like it works below 9.65.0 but when I done this locally for drei below 9.65.0 (for instance I cheked: 9.59.1, 9.57.3) behaves same - screen is darker. @CodyJasonBennett maybe it comes form three-stdlib instead of drei?

@Russo-creation
Copy link
Author

Here I prepared repository to reproduce https://github.com/Russo-creation/ssaa-bug with dependency list

  • @react-three/drei": "^9.58.4
  • @react-three/fiber": "^8.13.6
  • three": "^0.155.0"

@Russo-creation
Copy link
Author

Russo-creation commented Aug 4, 2023

After couple of tests with three-stdlib (local version)- it looks like screen is not going darker depending on the Sample Level with "three-stdlib": "^2.22.5" I can't test versions 2.23.X because I'm getting an errors. Also other Post-proccesing effects like unreal bloom is not working with mentioned version of three-stdlib

it's still Darker (SSAA have inpact on colors but differently) as it not suppose to be - antyaliasing should not affect on the colors

with SSAA
image

Without postprocessing
image

@CodyJasonBennett
Copy link
Member

Thanks for the thorough reproduction, I'll take a look.

@CodyJasonBennett
Copy link
Member

I released [email protected] with pmndrs/three-stdlib#277 which should address darkening. Remaining banding I can only attribute to undersampling and/or lack of precision. I don't believe we use fp16 there yet.

@CodyJasonBennett CodyJasonBennett added bug Something isn't working three-stdlib Fixed in three-stdlib labels Aug 6, 2023
@Russo-creation
Copy link
Author

Thanks for the fix- sampleLevel it's not affecting on scene darkening, but SSAA is still affecting on the colors (is adding more contrast or something as in screenshots above) along with unrealBloom scene is glowing a lot even when threshold is set above 1.

It would be cool to have it fixed because it makes impossible to smooth Alpha hash (feature from three r 154) https://threejs.org/examples/?q=has#webgl_materials_alphahash for improving quality and react-three/postprocessing (vanruesc) does not support this type of antyaliasing.

Copy link

Thank you for contributing! We’re marking this issue as stale as a gentle reminder to revisit it and give it the attention it needs to move forward.

Any activity, like adding an update or comment, will automatically remove the stale label so it stays on our radar.

Feel free to reach out on Discord if you need support or feedback from the community. This issue will close automatically soon if there’s no further activity. Thank you for understanding and for being part of the project!

@github-actions github-actions bot added the Stale Inactive issue label Oct 30, 2024
Copy link

github-actions bot commented Nov 7, 2024

We’re closing this issue to keep our project manageable and make room for other active work, but we truly appreciate your effort and contribution.

If you’d like to continue working on this, please feel free to re-open it or reach out on Discord — our community is always ready to support you. Thanks again for helping us stay organized and for understanding our approach!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale Inactive issue three-stdlib Fixed in three-stdlib
Projects
None yet
Development

No branches or pull requests

2 participants