diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-11-19 20:03:06 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-11-19 20:05:15 +0300 |
commit | 7bb512594cd9502fea290ac6124f2eb5fd3cfce8 (patch) | |
tree | 190b9e4184e6eabf3349e74bf6d58c6da9f29288 /source/blender/blenkernel/BKE_studiolight.h | |
parent | 2b56d2183972a0cb3b1355652a6709599ae6af0d (diff) |
Workbench: Use non-negative lighting evaluation
This makes the lighting a bit more diffuse but don't produce negative
values.
Add a bias of 1.5f to make the lighting a bit more directionnal.
The implementation is based on:
https://github.com/kayru/Probulator/blob/master/Source/Probulator/SphericalHarmonics.h#L136
which is derived from:
http://www.geomerics.com/wp-content/uploads/2015/08/CEDEC_Geomerics_ReconstructingDiffuseLighting1.pdf
The shader implementation is optimized and has the same runtime cost
as previous method:
* no sh eval : 0.13ms
* prev sh eval : 0.14ms
* new sh eval : 0.22ms
* new sh eval opti : 0.14ms
Diffstat (limited to 'source/blender/blenkernel/BKE_studiolight.h')
-rw-r--r-- | source/blender/blenkernel/BKE_studiolight.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h index cbb911ee32c..7ec98c99c3f 100644 --- a/source/blender/blenkernel/BKE_studiolight.h +++ b/source/blender/blenkernel/BKE_studiolight.h @@ -62,7 +62,7 @@ #define STUDIOLIGHT_ICON_SIZE 96 /* Only 1 - 5 is supported */ -#define STUDIOLIGHT_SH_BANDS 3 +#define STUDIOLIGHT_SH_BANDS 2 #define STUDIOLIGHT_SH_COEFS_LEN (STUDIOLIGHT_SH_BANDS * STUDIOLIGHT_SH_BANDS) |