Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-06-26 17:07:39 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-06-26 17:07:39 +0300
commitfbaf6e6fb3d2eb2f0c737b7d4713a5ea171738e6 (patch)
tree35bfa54eef6240693a13d594bb49ed7c8d33b32e /source/blender/draw/engines/eevee/eevee_lookdev.c
parentbba0ad903cfa407368c78b0b8480b1a729474305 (diff)
parentc07f2bc89196ea449a2875634eb85efa45733fb5 (diff)
Merge remote-tracking branch 'origin/blender2.8' into temp-dynamic-overridestemp-dynamic-overrides
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_lookdev.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lookdev.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c
index 806fb65b8e8..e083c9b5eb5 100644
--- a/source/blender/draw/engines/eevee/eevee_lookdev.c
+++ b/source/blender/draw/engines/eevee/eevee_lookdev.c
@@ -45,7 +45,7 @@ void EEVEE_lookdev_cache_init(
StudioLight *sl = BKE_studiolight_find(v3d->shading.studio_light, STUDIOLIGHT_INTERNAL | STUDIOLIGHT_ORIENTATION_WORLD);
if ((sl->flag & STUDIOLIGHT_ORIENTATION_WORLD)) {
struct Gwn_Batch *geom = DRW_cache_fullscreen_quad_get();
- GPUTexture *tex;
+ GPUTexture *tex = NULL;
*grp = DRW_shgroup_create(shader, pass);
axis_angle_to_mat3_single(stl->g_data->studiolight_matrix, 'Z', v3d->shading.studiolight_rot_z);
@@ -59,15 +59,18 @@ void EEVEE_lookdev_cache_init(
if (!pinfo) {
/* Do not fadeout when doing probe rendering, only when drawing the background */
DRW_shgroup_uniform_float(*grp, "studioLightBackground", &v3d->shading.studiolight_background, 1);
-
- BKE_studiolight_ensure_flag(sl, STUDIOLIGHT_EQUIRECTANGULAR_IRRADIANCE_GPUTEXTURE);
- tex = sl->equirectangular_irradiance_gputexture;
+ if (v3d->shading.studiolight_background > 0.0f) {
+ BKE_studiolight_ensure_flag(sl, STUDIOLIGHT_EQUIRECTANGULAR_IRRADIANCE_GPUTEXTURE);
+ tex = sl->equirectangular_irradiance_gputexture;
+ }
}
else {
BKE_studiolight_ensure_flag(sl, STUDIOLIGHT_EQUIRECTANGULAR_RADIANCE_GPUTEXTURE);
tex = sl->equirectangular_radiance_gputexture;
}
- DRW_shgroup_uniform_texture(*grp, "image", tex);
+ if (tex != NULL) {
+ DRW_shgroup_uniform_texture(*grp, "image", tex);
+ }
/* Do we need to recalc the lightprobes? */
if (pinfo &&