Reduced AO processing time by 1/3

This is achieved by computing a small 2x2 box blur in the AO pass
taking advantage of quad shading, which allows to halve the size
of the bilateral blur kernel.

Reducing the size of the blur kernel has a side effect to kick Adreno
gpu into direct mode, which apparently is much faster here.

Overall we go from 3.4ms to 2.4ms on Pixel4.

The quality is impacted, but not severely. This probably assumes 
GPU that have working derivatives.
This commit is contained in:
Mathias Agopian
2020-02-18 18:07:38 -08:00
committed by Mathias Agopian
parent 4dd3d7ab5e
commit 4e8f323e47
5 changed files with 27 additions and 21 deletions

View File

@@ -239,8 +239,8 @@ Java_com_google_android_filament_View_nSetAmbientOcclusionOptions(JNIEnv*, jclas
View* view = (View*) nativeView;
View::AmbientOcclusionOptions options = {
.radius = radius,
.bias = bias,
.power = power,
.bias = bias,
.resolution = resolution,
.intensity = intensity
};