From d16342e5fd1f51c01bc1f9becc6ec0704d783de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 9 Aug 2017 16:54:18 +0200 Subject: Eevee: Add Screen Space Refraction. For the moment the only way to enable this is to: - enable Screen Space REFLECTIONS. - enable Screen Space Refraction in the SSR parameters. - enable Screen Space Refraction in the material tab. --- source/blender/makesrna/intern/rna_material.c | 5 +++++ source/blender/makesrna/intern/rna_scene.c | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index d01ce407815..40c4345659c 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1869,6 +1869,11 @@ 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_refraction", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "blend_flag", MA_BL_REFRACTION); + RNA_def_property_ui_text(prop, "Screen Space Refraction" , "Use raytraced screen space refraction"); + 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"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 3bd104f1e7d..92b62e5c5ec 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2634,6 +2634,7 @@ RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(volumetric_light_clamp) RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(volumetric_shadows) RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(volumetric_shadow_samples) RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(volumetric_colored_transmittance) +RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(ssr_refraction) RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(ssr_enable) RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(ssr_halfres) RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(ssr_ray_count) @@ -6204,6 +6205,13 @@ 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"); + prop = RNA_def_property(srna, "ssr_refraction", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_refraction_get", + "rna_LayerEngineSettings_Eevee_ssr_refraction_set"); + RNA_def_property_ui_text(prop, "Screen Space Refractions", "Enable screen space Refractions"); + 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, "ssr_halfres", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_halfres_get", "rna_LayerEngineSettings_Eevee_ssr_halfres_set"); -- cgit v1.2.3