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>2018-11-15 16:44:45 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-15 20:16:30 +0300
commit516e000aa9762c6b19c64ce46e5dd458cd04a1fb (patch)
treedaef7a7f7e8211e212aa24bc9a8a8322d7eef25f /source/blender/makesdna
parentd082b18d877f2da661ee2a48fdf3c69d67406e86 (diff)
Eevee: Add Light Threshold value
This is an important change. Starting from now, all lights have a finite influence radius (similar to the old sphere option for BI). In order to avoid costly setup time, this distance is first computed automatically based on a light threshold. The distance is computed at the light origin and using the inverse square falloff. The setting can be found inside the render settings panel > shadow tab. This light threshold does not take the light shape into account an may not suit every case. That's why we provide a per lamp override where you can just set the cutt off distance (Light Properties Panel > Light > Custom Distance). The influence distance is also used as shadow far clip distance. This influence distance does not concerns sun lights that still have a far clip distance. --- This change is important because it makes it possible to cull lights an improve performance drastically in the future.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h3
-rw-r--r--source/blender/makesdna/DNA_scene_types.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index f9958abb603..d035e0c5440 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -86,7 +86,7 @@ typedef struct Lamp {
float contact_dist, contact_bias, contact_spread, contact_thickness;
- float spec_fac, pad;
+ float spec_fac, att_dist;
/* preview */
struct PreviewImage *preview;
@@ -134,6 +134,7 @@ typedef struct Lamp {
#define LA_SHOW_CONE (1 << 17)
/* #define LA_SHOW_SHADOW_BOX (1 << 18) */
#define LA_SHAD_CONTACT (1 << 19)
+#define LA_CUSTOM_ATTENUATION (1 << 20)
/* falloff_type */
#define LA_FALLOFF_CONSTANT 0
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 1352e28e6c2..c78f622e8bc 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1508,7 +1508,7 @@ typedef struct SceneEEVEE {
char light_cache_info[64];
float overscan;
- float pad;
+ float light_threshold;
} SceneEEVEE;
/* *************************************************************** */