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:
-rw-r--r--source/blender/draw/engines/eevee/eevee_engine.c6
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c5
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c
index 0729b2078a8..81edee17c76 100644
--- a/source/blender/draw/engines/eevee/eevee_engine.c
+++ b/source/blender/draw/engines/eevee/eevee_engine.c
@@ -52,6 +52,8 @@ static void eevee_engine_init(void *ved)
stl->g_data->valid_taa_history = (txl->taa_history != NULL);
stl->g_data->queued_shaders_count = 0;
stl->g_data->render_timesteps = 1;
+ stl->g_data->disable_ligthprobes = v3d &&
+ (v3d->object_type_exclude_viewport & (1 << OB_LIGHTPROBE));
/* Main Buffer */
DRW_texture_ensure_fullscreen_2d(&txl->color, GPU_RGBA16F, DRW_TEX_FILTER);
@@ -253,6 +255,10 @@ static void eevee_draw_scene(void *vedata)
/* Set ray type. */
sldata->common_data.ray_type = EEVEE_RAY_CAMERA;
sldata->common_data.ray_depth = 0.0f;
+ if (stl->g_data->disable_ligthprobes) {
+ sldata->common_data.prb_num_render_cube = 1;
+ sldata->common_data.prb_num_render_grid = 1;
+ }
GPU_uniformbuf_update(sldata->common_ubo, &sldata->common_data);
GPU_framebuffer_bind(fbl->main_fb);
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 219c44de9dc..94915180483 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -1193,6 +1193,11 @@ void EEVEE_lightprobes_refresh_planar(EEVEE_ViewLayerData *sldata, EEVEE_Data *v
common_data->ssrefract_toggle = false;
common_data->sss_toggle = false;
+ if (vedata->stl->g_data->disable_ligthprobes) {
+ sldata->common_data.prb_num_render_cube = 1;
+ sldata->common_data.prb_num_render_grid = 1;
+ }
+
common_data->ray_type = EEVEE_RAY_GLOSSY;
common_data->ray_depth = 1.0f;
/* Planar reflections are rendered at the `hiz` resolution, so no need to scaling. */
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index effae313acf..9f97dacf9fe 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -1012,6 +1012,7 @@ typedef struct EEVEE_PrivateData {
struct DRWCallBuffer *planar_display_shgrp;
struct GHash *material_hash;
float background_alpha; /* TODO: find a better place for this. */
+ bool disable_ligthprobes;
/* Chosen lightcache: can come from Lookdev or the viewlayer. */
struct LightCache *light_cache;
/* For planar probes */