diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-02-16 19:01:15 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-02-21 03:33:56 +0300 |
commit | 64d96f68d6ef0411383bb46d1a95d47769d927e5 (patch) | |
tree | 11630fe6451b696963ad8ede9565fa856f693bcb /source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | |
parent | 6c2e1f33983766ee5ee028e14a24e36c28d0a566 (diff) |
EEVEE: Ambient Occlusion: Refactor
- Fix noise/banding artifact on distant geometry.
- Fix overshadowing on un-occluded surfaces at grazing angle producing "fresnel"
like shadowing. Some of it still appears but this is caused to the low number
of horizons per pixel.
- Improve performance by using a fixed number of samples and fixing the
sampling area size. A better sampling pattern is planned to recover
the lost precision on large AO radius.
- Improved normal reconstruction for the AO pass.
- Improve Bent Normal reconstruction resulting in less faceted look on
smoothed geometry.
- Add Thickness heuristic to avoid overshadowing of thin objects.
Factor is currently hardcoded.
- Add bent normal support to Glossy reflections.
- Change Glossy occlusion to give less light leaks from lightprobes.
It can overshadow on smooth surface but this should be mitigated by
using SSR.
- Use Bent Normal for rough Glossy surfaces.
- Occlusion is now correctly evaluated for each BSDF. However this does make
everything slower. This is mitigated by the fact the search is a lot faster
than before.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl index cb4d8931af0..241b9240606 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl @@ -1,13 +1,9 @@ #pragma BLENDER_REQUIRE(common_math_lib.glsl) -vec3 diffuse_dominant_dir(vec3 N, vec3 vis_cone_dir, float vis_cone_aperture_cos) +vec3 diffuse_dominant_dir(vec3 bent_normal) { - /* TODO(fclem) revisit this. bent too much towards vis_cone_dir. */ - vis_cone_aperture_cos *= sqr(vis_cone_aperture_cos); - - N = mix(vis_cone_dir, N, vis_cone_aperture_cos); - return normalize(N); + return bent_normal; } vec3 specular_dominant_dir(vec3 N, vec3 V, float roughness) |