Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SMAA weights not working as expected#663

Answeredbyvanruesc
AdrianFahrbach asked this question inQ&A
Discussion options

Hey there!

I'm currently trying to improve the antialiasing of a webgl Three.js app. We are using theSMAAEffect.
I've tried playing around with the settings a bit by copying the tweak panel fromthe demo, but no matter what I try, the effect of SMAA is always very little to not visible at all.

To me, it looks like my edge detection is fine, but the weighted result that I get are "broken". If I compare my results to what I see in theinteractive demo, then it feels like I'm doing something wrong.

Do you have an idea what I could be missing? Or is this maybe even expected, since my scene is quite dark and my edges are relatively small.
My Three.js knowledge is quite limited, so any input is highly appreciated!

vlcsnap-2024-10-11-23h06m47s083
vlcsnap-2024-10-11-23h08m21s889
vlcsnap-2024-10-11-23h08m43s810

screencast.mp4
You must be logged in to vote

Hi, the weights seem to be calculated correctly and the detected edges seem to be smoothed as expected.

If you're talking about the broken lines and shimmering in motion, then that's not something SMAA can fix. You'd need to use MSAA to get more stable highlights in a dark scene like this. TAA would likely also yield better results in this case, but that's currently not included inpostprocessing.

For SMAA I'd recommend sticking to the color edge detection with depth-based predication. Use a lowpredicationThreshold around0.0002, apredicationStrength of1 and apredicationScale of2. Also, make sure to optimize your depth buffer range by setting the camera'snear plane to something like0…

Replies: 1 comment 1 reply

Comment options

Hi, the weights seem to be calculated correctly and the detected edges seem to be smoothed as expected.

If you're talking about the broken lines and shimmering in motion, then that's not something SMAA can fix. You'd need to use MSAA to get more stable highlights in a dark scene like this. TAA would likely also yield better results in this case, but that's currently not included inpostprocessing.

For SMAA I'd recommend sticking to the color edge detection with depth-based predication. Use a lowpredicationThreshold around0.0002, apredicationStrength of1 and apredicationScale of2. Also, make sure to optimize your depth buffer range by setting the camera'snear plane to something like0.3 or1.0. This increases the accuracy of the predication. Thefar setting doesn't matter much for this.

You must be logged in to vote
1 reply
@AdrianFahrbach
Comment options

Makes sense. I switched to MSAA and it works perfectly.
Thank you so much! Awesome to see that you are always responding to the discussions here with such a technical depth!

Answer selected byAdrianFahrbach
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@AdrianFahrbach@vanruesc

[8]ページ先頭

©2009-2025 Movatter.jp