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:
authorClément Foucault <foucault.clem@gmail.com>2017-06-14 14:45:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-06-15 01:55:45 +0300
commit26e710b1fd57919a057306d39dcc8e6a04bb64a7 (patch)
tree61eae1eb620df3ecf6769721d7c1289af1e78d8c /source/blender/draw/modes
parent4873ff005b47908393fbc1e95b7fcfa4568d1072 (diff)
Eevee: Add Grid debug display.
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r--source/blender/draw/modes/object_mode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index e1388346008..fecbe0f414b 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -1410,6 +1410,7 @@ static void DRW_shgroup_speaker(OBJECT_StorageList *stl, Object *ob, SceneLayer
static void DRW_shgroup_lightprobe(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl)
{
+ static float one = 1.0f;
float *color;
LightProbe *prb = (LightProbe *)ob->data;
DRW_object_wire_theme_get(ob, sl, &color);
@@ -1419,7 +1420,10 @@ static void DRW_shgroup_lightprobe(OBJECT_StorageList *stl, Object *ob, SceneLay
DRW_shgroup_call_dynamic_add(stl->g_data->probe, ob->obmat[3], color);
if ((prb->flag & LIGHTPROBE_FLAG_SHOW_INFLUENCE) != 0) {
- if (prb->attenuation_type == LIGHTPROBE_SHAPE_BOX) {
+ if (prb->type == LIGHTPROBE_TYPE_GRID) {
+ DRW_shgroup_call_dynamic_add(stl->g_data->cube, color, &one, ob->obmat);
+ }
+ else if (prb->attenuation_type == LIGHTPROBE_SHAPE_BOX) {
DRW_shgroup_call_dynamic_add(stl->g_data->cube, color, &prb->distinf, ob->obmat);
DRW_shgroup_call_dynamic_add(stl->g_data->cube, color, &prb->distfalloff, ob->obmat);
}
@@ -1432,7 +1436,6 @@ static void DRW_shgroup_lightprobe(OBJECT_StorageList *stl, Object *ob, SceneLay
if ((prb->flag & LIGHTPROBE_FLAG_SHOW_PARALLAX) != 0) {
float (*obmat)[4], *dist;
-
if ((prb->flag & LIGHTPROBE_FLAG_CUSTOM_PARALLAX) != 0) {
dist = &prb->distpar;
/* TODO object parallax */