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
Adding support for Specular-AA #2141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some unused variables/functions that should be trimmed out if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that looks good! 👍
Should we set this on by default? Are there any disadvantages in doing so? It doesn't seem computationally intensive |
Personally, I'm inclined to set its default value to True, however, others may not want anti-aliasing to be on by default (for some reason it seems most people use the low quality graphics mode in JME), so I'm not sure if the default here should be changed to True... |
I forgot one thing, I will expose the two parameters Screen Space Variance and Threshold to material parameters tomorrow as well. For descriptions of them, refer to: |
I think we should make an exception in this case, since it won't impact performances too much and it is most likely a wanted feature, i doubt anyone likes aliasing in the reflections, but let's wait for a counterargument . |
I would say make it default |
agree, i think it should be default with just option to disable. (like its option now) Tho i belive it might be nice to add later to PBRTerrain too? (it do not need to be this pr ofc) |
Specular-AA has been added to PBRTerrain.
True has been set as the default value, and two material parameters (Screen Space Variance and Threshold) have been added. |
jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.frag
Outdated
Show resolved
Hide resolved
jme3-terrain/src/main/resources/Common/MatDefs/Terrain/AdvancedPBRTerrain.frag
Outdated
Show resolved
Hide resolved
jme3-terrain/src/main/resources/Common/MatDefs/Terrain/PBRTerrain.frag
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! If there are no further objections, I will merge it within 24 hours.
see:http://www.jp.square-enix.com/tech/library/pdf/ImprovedGeometricSpecularAA(slides).pdf
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@15.0/manual/Geometric-Specular-Anti-Aliasing.html
https://hub.jmonkeyengine.org/t/geometric-specular-anti-aliasing/47246/2
Usage: Simply set Material.setBoolean("SpecularAA", true);