Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
193 stars 9 forks source link

CTAA Integration #853

Closed shiftyscales closed 4 years ago

shiftyscales commented 4 years ago

Requested by Enverex, and Cyro, CTAA for Unity is a temporal anti-aliasing solution available that if integrated could provide a high speed, and high quality anti-aliasing option for our current rendering pipeline. https://assetstore.unity.com/packages/vfx/shaders/ctaa-nxt-v2-cinematic-temporal-anti-aliasing-153092

Reportedly, it is available on the current deferred rendering pipeline, as well as various VR rendering methods including single-pass stereo rendering.

Notably- in reading documentation, and reviews, it sounds as though this plugin is not currently compatible with the Universal Rendering Pipeline (URP) which makes it incompatible with #335. From a reply they made to a review as of four months ago:

CTAA requires motion vectors, Which are Not Available in URP, please look here >https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@7.0/manual/integration-with-post-processing.html Also, the custom Post Processing in URP has a lot of functions missing for CTAA to work. We have never mentioned CTAA to work with URP. CTAA will have complete URP support as soon as it is actually possible. HDRP Support will be coming soon as Unity recently enabled the required features for us to port CTAA for HDRP

The license itself is relatively inexpensive, so this could be an interesting plugin to look into for lack of a good fast, and high quality AA option on the deferred rendering pipeline with a caveat that it would block updating to the URP/scriptable rendering pipeline until the developers, and Unity finish work to enable its support.

Frooxius commented 4 years ago

Hmm... We could get that package and integrate it for now, but the fact that it doesn't support URP is a bit tricky. However URP also doesn't have full support for Deferred as far as I know and the need for it is negated a bit, because it renders multiple lights in a single pass (I think 8 last time I checked), so it could use MSAA instead.

We're not switching to it anytime soon anyways, so this could be a good holdover anyways. I'll talk with Karel and see if we can get the package, hopefully it's mostly drag and drop into the post processing stack.

Frooxius commented 4 years ago

Also one benefit seems that it also eliminates aliasing from specular highlights, which is something that traditional antialiasing doesn't really deal with (and that's something that was often the cause of aliasing in the examples shown before).

BlueCyro commented 4 years ago

This is super exciting! I really hope this goes through, I can't wait to have my eyes be blessed by the grace of proper AA.

Frooxius commented 4 years ago

Added optional support in 2020.8.5.1178.

-- To enable, pass the -CTAA argument on command line, otherwise FXAA is used -- You can also override the default settings with following parameters: --- -CTAATemporalEdgePower <number from 1.0 to 4.0> - default 1.0 --- -CTAASharpnessEnabled <True/False> - default True --- -CTAAAdaptiveSharpness <number from 0.0 to 0.5> - default 0.1