diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-20 17:07:31 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-20 17:08:11 +0300 |
commit | a3428131b61f84976e304c035c8d46b5efdffae1 (patch) | |
tree | dac84a38c035e2f05d0ccadcc7dd17d55f49fe99 /source/blender/blenkernel/BKE_studiolight.h | |
parent | 3414a16705c1334d9685f3ab2ba5b04e2824a4dc (diff) |
Studiolight: Spherical harmonics
Compile time option to reduce the level of the SH
Diffstat (limited to 'source/blender/blenkernel/BKE_studiolight.h')
-rw-r--r-- | source/blender/blenkernel/BKE_studiolight.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h index f9d679b1b1a..af7ef9a383e 100644 --- a/source/blender/blenkernel/BKE_studiolight.h +++ b/source/blender/blenkernel/BKE_studiolight.h @@ -61,6 +61,22 @@ #define STUDIOLIGHT_ICON_SIZE 96 +#define STUDIOLIGHT_SPHERICAL_HARMONICS_LEVEL 2 +#define STUDIOLIGHT_SPHERICAL_HARMONICS_MAX_COMPONENTS 9 + + +#if STUDIOLIGHT_SPHERICAL_HARMONICS_LEVEL == 0 +#define STUDIOLIGHT_SPHERICAL_HARMONICS_COMPONENTS 1 +#endif + +#if STUDIOLIGHT_SPHERICAL_HARMONICS_LEVEL == 1 +#define STUDIOLIGHT_SPHERICAL_HARMONICS_COMPONENTS 4 +#endif + +#if STUDIOLIGHT_SPHERICAL_HARMONICS_LEVEL == 2 +#define STUDIOLIGHT_SPHERICAL_HARMONICS_COMPONENTS 9 +#endif + struct GPUTexture; struct StudioLight; @@ -97,12 +113,12 @@ typedef struct StudioLight { char name[FILE_MAXFILE]; char path[FILE_MAX]; char *path_irr_cache; - char *path_sh2_cache; + char *path_sh_cache; int icon_id_irradiance; int icon_id_radiance; int icon_id_matcap; int icon_id_matcap_flipped; - float spherical_harmonics_coefs[9][3]; + float spherical_harmonics_coefs[STUDIOLIGHT_SPHERICAL_HARMONICS_COMPONENTS][3]; float light_direction[3]; ImBuf *equirectangular_radiance_buffer; ImBuf *equirectangular_irradiance_buffer; |