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-09-01 16:59:58 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-09-10 04:09:45 +0300
commite2603a6e821936e9204cba224961beac77b059f4 (patch)
treebb171eef592c154cc7c2a4759c2cb35cdd4f629a /source/blender/makesrna/intern/rna_scene.c
parent8b7a83a868c03f3d721eb83498923673c2addb27 (diff)
Eevee: Shadows: Add UI buttons for size and method
Only one method is available right now. VSM and PCF are comming.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index f61e0212f63..3e744923d45 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2658,6 +2658,8 @@ RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_max_roughness)
RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_thickness)
RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_border_fade)
RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_firefly_fac)
+RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(shadow_method)
+RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(shadow_size)
/* object engine */
RNA_LAYER_MODE_OBJECT_GET_SET_BOOL(show_wire)
@@ -6205,6 +6207,26 @@ static void rna_def_scene_layer_engine_settings_eevee(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ /* Keep in sync with eevee_private.h */
+ static EnumPropertyItem eevee_shadow_method_items[] = {
+ {1, "ESM", 0, "ESM", "Exponential Shadow Mapping"},
+ /* TODO */
+ // {2, "VSM", 0, "VSM", "Variance Shadow Mapping"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ static EnumPropertyItem eevee_shadow_size_items[] = {
+ {64, "64", 0, "64px", ""},
+ {128, "128", 0, "128px", ""},
+ {256, "256", 0, "256px", ""},
+ {512, "512", 0, "512px", ""},
+ {1024, "1024", 0, "1024px", ""},
+ {2048, "2048", 0, "2048px", ""},
+ {4096, "4096", 0, "4096px", ""},
+ {8192, "8192", 0, "8192px", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
srna = RNA_def_struct(brna, "SceneLayerEngineSettingsEevee", "SceneLayerSettings");
RNA_def_struct_ui_text(srna, "Eevee Scene Layer Settings", "Eevee Engine settings");
@@ -6532,6 +6554,21 @@ static void rna_def_scene_layer_engine_settings_eevee(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_SceneLayerEngineSettings_update");
+ /* Shadows */
+ prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_shadow_method_get", "rna_LayerEngineSettings_Eevee_shadow_method_set", NULL);
+ RNA_def_property_enum_items(prop, eevee_shadow_method_items);
+ RNA_def_property_ui_text(prop, "Method", "Technique use to compute the shadows");
+ RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
+ RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_SceneLayerEngineSettings_update");
+
+ prop = RNA_def_property(srna, "shadow_size", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_shadow_size_get", "rna_LayerEngineSettings_Eevee_shadow_size_set", NULL);
+ RNA_def_property_enum_items(prop, eevee_shadow_size_items);
+ RNA_def_property_ui_text(prop, "Size", "Size of every shadow maps");
+ RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
+ RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_SceneLayerEngineSettings_update");
+
RNA_define_verify_sdna(1); /* not in sdna */
}