diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-07-22 00:48:48 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-07-24 16:28:27 +0300 |
commit | a3732412ad5b2adda8e820088fba76d3c8f6ea00 (patch) | |
tree | 0e7b8dd9fd16c143bd550d6af77171c546fa2219 /source/blender/makesrna | |
parent | 18aa6cf1cc66ace97f23d984d8cce528ebc9f77d (diff) |
Eevee: SSR: Add stride and thickness parameters.
Also polished the raytracing algorithm.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index a0f8f500d26..314d0b18f5f 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2623,6 +2623,8 @@ 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_enable) +RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(ssr_stride) +RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_thickness) /* object engine */ RNA_LAYER_MODE_OBJECT_GET_SET_BOOL(show_wire) @@ -6185,6 +6187,23 @@ 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_stride", PROP_INT, PROP_PIXEL); + RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_stride_get", + "rna_LayerEngineSettings_Eevee_ssr_stride_set", NULL); + RNA_def_property_ui_text(prop, "Stride", "Step size between two raymarching samples"); + RNA_def_property_range(prop, 1, 32); + 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_thickness", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_thickness_get", + "rna_LayerEngineSettings_Eevee_ssr_thickness_set", NULL); + RNA_def_property_ui_text(prop, "Thickness", "Pixel thickness used to detect intersection"); + RNA_def_property_range(prop, 1e-6f, FLT_MAX); + RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 5, 3); + RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); + RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_SceneLayerEngineSettings_update"); + /* Volumetrics */ prop = RNA_def_property(srna, "volumetric_enable", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_enable_get", |