[Bf-blender-cvs] [c2f3ba64ce3] master: Fix T63198 Eevee: Indirect lighting settings arent not updating in Lookdev

Clément Foucault noreply at git.blender.org
Thu Apr 4 18:00:02 CEST 2019


Commit: c2f3ba64ce3b7cb0dd0498b708471b6470c589a6
Author: Clément Foucault
Date:   Thu Apr 4 17:58:35 2019 +0200
Branches: master
https://developer.blender.org/rBc2f3ba64ce3b7cb0dd0498b708471b6470c589a6

Fix T63198 Eevee: Indirect lighting settings arent not updating in Lookdev

This was caused by a missing check for those option.

===================================================================

M	source/blender/draw/engines/eevee/eevee_lookdev.c
M	source/blender/draw/engines/eevee/eevee_private.h

===================================================================

diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c
index b07b20386a8..4a5b4817c51 100644
--- a/source/blender/draw/engines/eevee/eevee_lookdev.c
+++ b/source/blender/draw/engines/eevee/eevee_lookdev.c
@@ -63,6 +63,8 @@ void EEVEE_lookdev_cache_init(
 	EEVEE_PrivateData *g_data = stl->g_data;
 	const DRWContextState *draw_ctx = DRW_context_state_get();
 	View3D *v3d = draw_ctx->v3d;
+	Scene *scene = draw_ctx->scene;
+
 	if (LOOK_DEV_STUDIO_LIGHT_ENABLED(v3d)) {
 		StudioLight *sl = BKE_studiolight_find(v3d->shading.lookdev_light, STUDIOLIGHT_ORIENTATIONS_MATERIAL_MODE);
 		if (sl && (sl->flag & STUDIOLIGHT_TYPE_WORLD)) {
@@ -137,11 +139,17 @@ void EEVEE_lookdev_cache_init(
 
 			/* Do we need to recalc the lightprobes? */
 			if (g_data->studiolight_index != sl->index ||
-			    g_data->studiolight_rot_z != v3d->shading.studiolight_rot_z)
+			    g_data->studiolight_rot_z != v3d->shading.studiolight_rot_z ||
+			    g_data->studiolight_cubemap_res != scene->eevee.gi_cubemap_resolution ||
+			    g_data->studiolight_glossy_clamp != scene->eevee.gi_glossy_clamp ||
+			    g_data->studiolight_filter_quality != scene->eevee.gi_filter_quality)
 			{
 				stl->lookdev_lightcache->flag |= LIGHTCACHE_UPDATE_WORLD;
 				g_data->studiolight_index = sl->index;
 				g_data->studiolight_rot_z = v3d->shading.studiolight_rot_z;
+				g_data->studiolight_cubemap_res = scene->eevee.gi_cubemap_resolution;
+				g_data->studiolight_glossy_clamp = scene->eevee.gi_glossy_clamp;
+				g_data->studiolight_filter_quality = scene->eevee.gi_filter_quality;
 			}
 		}
 	}
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index f112ae0536e..66e45430e18 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -822,6 +822,9 @@ typedef struct EEVEE_PrivateData {
 	/* LookDev Settings */
 	int studiolight_index;
 	float studiolight_rot_z;
+	int studiolight_cubemap_res;
+	float studiolight_glossy_clamp;
+	float studiolight_filter_quality;
 
 } EEVEE_PrivateData; /* Transient data */



More information about the Bf-blender-cvs mailing list