Closed toloudis closed 1 year ago
Status | Category | Percentage | Covered / Total |
---|---|---|---|
π΄ | Statements | 40.27% | 1951/4844 |
π΄ | Branches | 43.78% | 814/1859 |
π΄ | Functions | 37.1% | 400/1078 |
π΄ | Lines | 40.54% | 1869/4610 |
Status of coverage: π’ - ok, π‘ - slightly more than threshold, π΄ - under the threshold
Problem
Resolves #303 Ambient Occlusion had poor behavior when zooming in close.
This may address #306 too.
Because AO is a screen space algorithm here, we are not going to get a perfect result in all cases. The things that affect the result are generally the range of very small geometries vs very large ones, and overall scene size (size of distance values). A scene with a very large bounding box and lots of very small geometries can look different than a scene with a small bounding box and just a few objects filling it.
Solution
I chose to replace the AO algorithm completely. The new one uses fewer samples, has more customizable parameters, and has a smoother result. The quality is good enough to use with one single render pass as opposed to two, which we were using before.
The AO result is not identical to the previous. Some care should be taken to verify. I tried to use settings and variables to scale with scene size and distance such that it is reasonably close to our previous production trajectories.
Type of change
Screenshots (optional):
The screen shots were not taken at identical viewer sizes so in some cases the number of pixels may also affect the differences.
Before: After
Before: After:
Before: After: