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

Optimize specular AA. #15

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Optimize specular AA. #15

wants to merge 3 commits into from

Conversation

wzw9803
Copy link
Contributor

@wzw9803 wzw9803 commented Apr 19, 2023

In this commit, we optimized the anti-aliasing of specular. Instead of only filtering geometryNormal before, we added filtering for normalMap.

企业微信截图_16818765469656

This is a small change. We plan to do another optimization in the future. We may add some parameters to the material to control the strength of anti-aliasing to meet the different needs of different scenarios.

And thanks again for the relevant information provided by @VanderSP!

Reference :
Tokuyoshi and Kaplanya, Stable Geometric Specular Antialiasing with Projected-Space NDF Filtering, 2021
Tokuyoshi and Kaplanyan, Improved Geometric Specular Antialiasing, 2019
Tokuyoshi, Error Reduction and Simplification for Shading Anti-Aliasing, 2017
Kaplanyan, Rendering Highly Specular Materials, 2016
Kaplanyan, NDFFiltering, 2016
Rock-Solid Shading, Dan Baker and Stephen Hill, 2012
Stephen Hill, Specular Showdown, 2011

@wzw9803 wzw9803 requested a review from shawn0326 April 19, 2023 06:17
1. Three specular anti-aliasing methods are provided for comparison.
2. Removed the large GLTF resource model.
@wzw9803
Copy link
Contributor Author

wzw9803 commented Apr 23, 2023

I tested Oasis, Three, T3d - master, T3d - feat-specular-antiAliasing - SPECULAR_AA2, Babylon, PlayCanvas antialiasing with the same model. PlayCanvas uses TAA anti-aliasing. I think the effect is the best when the camera is still, so we take the effect of PlayCanvas as the standard and have the following conclusions:
image
image

  1. Babylon anti-aliasing works best, but maybe a bit too much, some highlight details seem to be lost. (maybe caused by different lighting)
    image

  2. T3d - feat-specular-antiAliasing - SPECULAR_AA2 Anti-aliasing effect Second, the advantage is that the anti-aliasing strength is adjustable, you can choose between anti-aliasing and highlight details, and adjust it to the highest strength, which is closer to the Babylon effect.
    image

  3. Oasis is slightly better than Three because Oasis handles NormalMap.
    image

  4. Three.
    image

  5. T3d - master
    image

Now we are still not sure which anti-aliasing method to use, so this branch is temporarily reserved, and more scenarios may be needed for testing.

Resources:
Test Model: dreadroamer

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

Successfully merging this pull request may close these issues.

1 participant