Eevee: Rework GTAO
This includes big improvement: - The horizon search is decoupled from the BSDF evaluation. This means using multiple BSDF nodes have a much lower impact when enbaling AO. - The horizon search is optimized by splitting the search into 4 corners searching similar directions to help which GPU cache coherence. - The AO options are now uniforms and do not trigger shader recompilation (aka. freeze UI). - Include a quality slider similar to the SSR one. - Add a switch for disabling bounce light approximation. - Fix problem with Bent Normals when occlusion get very dark. - Add a denoise option to that takes the neighbors pixel values via glsl derivatives. This reduces noise but exhibit 2x2 blocky artifacts. The downside : Separating the horizon search uses more memory (~3MB for each samples on HD viewport). We could lower the bit depth to 4bit per horizon but it produce noticeable banding (might be fixed with some dithering).
This commit is contained in:
@@ -969,8 +969,7 @@ static void render_scene_to_probe(
|
||||
/* Disable AO until we find a way to hide really bad discontinuities between cubefaces. */
|
||||
tmp_ao_dist = stl->effects->ao_dist;
|
||||
tmp_ao_samples = stl->effects->ao_samples;
|
||||
stl->effects->ao_dist = 0.0f;
|
||||
stl->effects->ao_samples = 0.0f;
|
||||
stl->effects->ao_settings = 0.0f; /* Disable AO */
|
||||
|
||||
/* 1 - Render to each cubeface individually.
|
||||
* We do this instead of using geometry shader because a) it's faster,
|
||||
@@ -1099,6 +1098,9 @@ static void render_scene_to_planar(
|
||||
|
||||
EEVEE_create_minmax_buffer(vedata, tmp_planar_depth, layer);
|
||||
|
||||
/* Compute GTAO Horizons */
|
||||
EEVEE_effects_do_gtao(sldata, vedata);
|
||||
|
||||
/* Rebind Planar FB */
|
||||
DRW_framebuffer_bind(fbl->planarref_fb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user