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-05-02 19:39:17 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-02 19:39:53 +0300
commit1ff2646d5858676761dac88e24b7d2da4ba4ba7d (patch)
treed0e292fe579530399b8e53a8689b157700c07dfc /source/blender/makesrna/intern/rna_lamp.c
parent965e6ed54f058c21ae6096a5449fb3d1e5235821 (diff)
Eevee: Add Lamp Specular multiplier.
It's usefull in some scenario to tweak the specular intensity of a light without modifying the diffuse contribution. Cycles allows it via lamps material which we currently not support in Eevee. This is a good workaround for now.
Diffstat (limited to 'source/blender/makesrna/intern/rna_lamp.c')
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 6f176ebe331..5bb24f0270d 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -312,6 +312,13 @@ static void rna_def_lamp_shadow(StructRNA *srna, int sun)
"in shadow maps");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ prop = RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "spec_fac");
+ RNA_def_property_range(prop, 0.0f, 9999.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 2);
+ RNA_def_property_ui_text(prop, "Specular Factor", "Specular reflection multiplier");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
prop = RNA_def_property(srna, "contact_shadow_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "contact_dist");
RNA_def_property_range(prop, 0.0f, 9999.0f);