diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-08-10 16:43:15 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-08-10 16:43:48 +0300 |
commit | 6e2f17ea02be5caa9eee8a68ccd558474030b29a (patch) | |
tree | 29584459e5306ede452923a4956b17ac85eacc3d /source/blender/makesrna/intern/rna_material.c | |
parent | 896154d15de716ef360d0187cb89f44102ac31ef (diff) |
Eevee: Refraction: Add "thickness" parameter.
This enables to fake a second refraction event. This is great to simulate thin planar objects such as glass panels.
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index a6427fda464..bd10bbc49ea 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1869,10 +1869,16 @@ void RNA_def_material(BlenderRNA *brna) "(avoids transparency sorting problems)"); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); - prop = RNA_def_property(srna, "transparent_screen_refraction", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_screen_refraction", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "blend_flag", MA_BL_SS_REFRACTION); RNA_def_property_ui_text(prop, "Screen Space Refraction" , "Use raytraced screen space refractions"); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); + + prop = RNA_def_property(srna, "refraction_depth", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_sdna(prop, NULL, "refract_depth"); + RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_ui_text(prop, "Refraction Depth", "Approximate the thickness of the object to compute two refraction " + "event (0 is disabled)"); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); /* For Preview Render */ |