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/intern | |
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/intern')
-rw-r--r-- | source/blender/draw/intern/shaders/common_math_lib.glsl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/intern/shaders/common_math_lib.glsl b/source/blender/draw/intern/shaders/common_math_lib.glsl index 0213ba2622b..d02fd27f35f 100644 --- a/source/blender/draw/intern/shaders/common_math_lib.glsl +++ b/source/blender/draw/intern/shaders/common_math_lib.glsl @@ -122,6 +122,12 @@ vec3 safe_normalize(vec3 v) return v / len; } +vec3 normalize_len(vec3 v, out float len) +{ + len = length(v); + return v / len; +} + /** \} */ /* ---------------------------------------------------------------------- */ |