-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Examples: Simplify composer setup in GTAO demo. #27319
Conversation
@Mugen87 small change, impressive impact 😍 |
The new demo runs at 60 FPS on my M2 Pro but on a Pixel 4a it runs with 10 FPS^^. Lower frame rates with low/mid end mobile devices are not surprising. I just wonder if we should keep the example as it is so we have more usable results on a greater variety of devices. |
I think rendering such effects in full native resolution is tricky on mobile devices. Projects have to compute the AO (and other effects) with smaller resolutions in order to avoid fragment-shader bound apps. For now, I don't add the device pixel ration for a better compromise of performance and quality. |
An AO algorithm is simply an approximation to an integral over a hemisphere. There are different algorithms, some are fast and give poor results, others are slower and give better results. GTAO belongs to the second category. None of the algorithms is ideal and all have advantages and disadvantages. |
Indeed. Against this backdrop it might make sense to keep SSAO which is the fastest of We maybe can ditch |
@Rabbid76 If you have the opportunity, it would be great if you could test the new demo with a mobile device. I have noticed some artifacts on the loaded asset when you zoom out. It's hard to describe but it looks like black/shadowed stripes that are present on the entire asset (see screenshot). The also depend on what camera angle you look at the scene. The go away if you zoom closer into the scene. |
@Mugen87 I will have a look. The issue seems to be related to the sample distribution of the gtao and/or denoiser. Or the device resolution is simply not set correctly somewhere. Fortunately, there are still a few days until the next release. |
No need to rush. 👍 The result of the pass is already impressive! Can't believe how good the AO has looked in the 5K rendering^^. |
The depth precision of this.depthTexture.format = DepthStencilFormat;
this.depthTexture.type = UnsignedInt248Type; In this way, we definitely get 24 bits. That should be sufficient. |
Um, that did not seem to help. Still getting the issue with a Pixel 4a. |
Yep, still the same. I will investigate this further... |
Do you still get the issue with this version? |
Respective PR #27320. The trick is using |
Solved! Thank you so much! ❤️ |
Awesome! BTW, with the default composer setup (without MSAA), the GTAO runs at 60 FPS on my Pixel 4a now 👍 . |
* Examples: Simplify composer setup in GTAO demo. * Examples: Update screenshots. * Examples: More clean up.
Related issue: #27317
Description
@Rabbid76 This PR simplifies the composer setup by not using MSAA and also rendering with the native resolution instead.
Ideally, user should not setup the render target for the composer manually. Besides, MSAA is not the best AA technique for (HDR) FX workflows. Yes, the demo does not use HDR but I suppose many users will use
GTAOPass
with a HDR workflow. Probably better to promote something different (like TAA or SMAA/FXAA) depending on the use case.