Merge branch 'master' into blender2.8
[blender.git] / source / blender / makesrna / intern / rna_material.c
index d01ce407815406cda248e1cb11805824fe06e8cc..bd10bbc49eaa48e3a06f0f47641d9635ab49c4ff 100644 (file)
@@ -1869,6 +1869,18 @@ 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, "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 */
        prop = RNA_def_property(srna, "preview_render_type", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "pr_type");