Geometric Specular Anti-aliasing

The inconsistent sampling frequency and signal change of the specular BRDF in PBR often leads to specular aliasing, which is very common in JME3. You can import a PBR model with obvious highlights. When rotating the view or moving away, you will find a series of discrete highlight points.
The solution is to apply highlight anti-aliasing for the specular term, which has become a mainstream practice. Below is Unity’s explanation of it and relevant papers:
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@15.0/manual/Geometric-Specular-Anti-Aliasing.html


image

I have implemented the method mentioned in the aforementioned paper on JME(Especially when I was testing global illumination recently, the highlight aliasing became more obvious.), currently, it looks like effective highlight anti-aliasing has been applied to the specular term. When moving the camera and zooming out, there are no more obvious discrete highlight points. I wonder if I should allow this part to be included as part of PBRLighting? (with very minimal code changes)

disable SpecularAA:


enable SpecularAA:

disable SpecularAA:

enable SpecularAA:

13 Likes

I’m all for it. It would be nice to use specular without those annoying artifacts. :smiley:

4 Likes

Alright, I will include these minimal modifications as part of PBRLighting, enabled or disabled via param, without affecting any existing functionalities. I will submit it later through a separate PR. :grinning:

5 Likes

I have submitted this part of the modifications in this PR.

8 Likes

Thank you for efforts @JhonKkk . You give us a lot of hope for the future of this engine :clap: :clap:

5 Likes

While i do not really see much difference in this pictures, i do know i seen it could help a lot even with my Terrain moisture shader where i noticed some visual issues where specAA could help :slight_smile:

Ofc usually Bloom/blur/etc lower artifact levels, but still specAA is nice :slight_smile:

Thanks Jhon!

2 Likes


SpecularAA has been set to true by default, while PBRTerrain has been updated.@yaRnMcDonuts

7 Likes