From 31ad86884cb1b9257f8958cd50942e76aefbd705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 14 Feb 2020 12:17:06 +0100 Subject: EEVEE: Shadow: Fix cascade shadowmap bias multiplicator This fixes the issue where sun shadowmaps needs a very big bias value to make any difference. The bias is now in world space and not dependant on shadow bounds. Unfortunatelly this breaks compatibility with previous version and old scene are likely to need user intervention to fix. Also fixes the property range. Fix T71661 EEVEE shadow from sun on incorrect face --- source/blender/makesrna/intern/rna_light.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_light.c') diff --git a/source/blender/makesrna/intern/rna_light.c b/source/blender/makesrna/intern/rna_light.c index ecee413a8e0..988504db2f9 100644 --- a/source/blender/makesrna/intern/rna_light.c +++ b/source/blender/makesrna/intern/rna_light.c @@ -294,7 +294,7 @@ static void rna_def_light_shadow(StructRNA *srna, bool sun) prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "bias"); - RNA_def_property_range(prop, 0.001f, 9999.0f); + RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_ui_range(prop, 0.001f, 5.0f, 1.0, 3); RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Bias for reducing self shadowing"); RNA_def_property_update(prop, 0, "rna_Light_update"); -- cgit v1.2.3