diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-10-24 15:49:00 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-10-27 23:49:15 +0300 |
commit | 66d8f82b832b58cba3273c0a4196fae6db0e1efd (patch) | |
tree | 682a3aba8fbd23ccd72a4e4f2a02fb36ad0a0d01 /source/blender/makesrna | |
parent | 1c0c63ce5b3914be2d0828260e5ac777a7596d36 (diff) |
Eevee: Overhaul the volumetric system.
The system now uses several 3D textures in order to decouple every steps of the volumetric rendering.
See https://www.ea.com/frostbite/news/physically-based-unified-volumetric-rendering-in-frostbite for more details.
On the technical side, instead of using a compute shader to populate the 3D textures we use layered rendering with a geometry shader to render 1 fullscreen triangle per 3D texture slice.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_layer.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c index 49c2da6973f..ca629f2963e 100644 --- a/source/blender/makesrna/intern/rna_layer.c +++ b/source/blender/makesrna/intern/rna_layer.c @@ -359,6 +359,7 @@ RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(motion_blur_shutter) RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(volumetric_enable) RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(volumetric_start) RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(volumetric_end) +RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(volumetric_tile_size) RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(volumetric_samples) RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(volumetric_sample_distribution) RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(volumetric_lights) @@ -1142,6 +1143,14 @@ static void rna_def_scene_layer_engine_settings_eevee(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; + static const EnumPropertyItem eevee_volumetric_tile_size_items[] = { + {2, "2", 0, "2px", ""}, + {4, "4", 0, "4px", ""}, + {8, "8", 0, "8px", ""}, + {16, "16", 0, "16px", ""}, + {0, NULL, 0, NULL, NULL} + }; + srna = RNA_def_struct(brna, "SceneLayerEngineSettingsEevee", "SceneLayerSettings"); RNA_def_struct_ui_text(srna, "Eevee Scene Layer Settings", "Eevee Engine settings"); @@ -1273,6 +1282,14 @@ 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, "volumetric_tile_size", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_tile_size_get", + "rna_LayerEngineSettings_Eevee_volumetric_tile_size_set", NULL); + RNA_def_property_enum_items(prop, eevee_volumetric_tile_size_items); + RNA_def_property_ui_text(prop, "Tile Size", "Number of samples to compute volumetric effects"); + 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, "volumetric_samples", PROP_INT, PROP_NONE); RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_samples_get", "rna_LayerEngineSettings_Eevee_volumetric_samples_set", NULL); |