Eevee: TAA Reprojection: Add layer property.
authorClément Foucault <foucault.clem@gmail.com>
Fri, 20 Apr 2018 16:20:39 +0000 (18:20 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Fri, 20 Apr 2018 16:29:33 +0000 (18:29 +0200)
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_view_layer.py
source/blender/draw/engines/eevee/eevee_engine.c
source/blender/makesrna/intern/rna_layer.c

index 10c823cc0a09ab5e9fdee58f7039a25f0a32e82e..dbdf6bb3609f1c61b7f5003fc92a80649a0fa647 100644 (file)
@@ -659,6 +659,7 @@ class RENDER_PT_eevee_sampling(RenderButtonsPanel, Panel):
         col = layout.column()
         col.prop(props, "taa_samples")
         col.prop(props, "taa_render_samples")
+        col.prop(props, "taa_reprojection")
 
 
 class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
index d43f5c43f28e160fc98007f6a1de84967d3392fa..2b80c857f97bf5041ab47bed884129fb731aff46 100644 (file)
@@ -409,6 +409,7 @@ class VIEWLAYER_PT_eevee_sampling(ViewLayerButtonsPanel, Panel):
         col = layout.column()
         col.template_override_property(layer_props, scene_props, "taa_samples")
         col.template_override_property(layer_props, scene_props, "taa_render_samples")
+        col.template_override_property(layer_props, scene_props, "taa_reprojection")
 
 
 class VIEWLAYER_PT_eevee_indirect_lighting(ViewLayerButtonsPanel, Panel):
index 3dd7d98842beead55b79e7b127a7f4b80b078a1f..be9a9fa157a09c93e23f62b6991292da2789675a 100644 (file)
@@ -437,6 +437,7 @@ static void eevee_view_layer_settings_create(RenderEngine *UNUSED(engine), IDPro
 
        BKE_collection_engine_property_add_int(props, "taa_samples", 16);
        BKE_collection_engine_property_add_int(props, "taa_render_samples", 64);
+       BKE_collection_engine_property_add_bool(props, "taa_reprojection", true);
 
        BKE_collection_engine_property_add_bool(props, "sss_enable", false);
        BKE_collection_engine_property_add_int(props, "sss_samples", 7);
index 8755f29c0f6c159bd424213bcc771270e30338e1..6082f6ddf2e871cc5956774d19bbd5458f045f30 100644 (file)
@@ -409,6 +409,7 @@ RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(shadow_size)
 RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(shadow_high_bitdepth)
 RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(taa_samples)
 RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(taa_render_samples)
+RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(taa_reprojection)
 RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(gi_diffuse_bounces)
 RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(gi_cubemap_resolution)
 RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(gi_visibility_resolution)
@@ -1184,6 +1185,14 @@ static void rna_def_view_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_ViewLayerEngineSettings_update");
 
+       prop = RNA_def_property(srna, "taa_reprojection", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_taa_reprojection_get",
+                                            "rna_LayerEngineSettings_Eevee_taa_reprojection_set");
+       RNA_def_property_ui_text(prop, "Viewport Denoising", "Denoise image using temporal reprojection "
+                                                            "(can leave some ghosting)");
+       RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
+       RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
+
        /* Screen Space Subsurface Scattering */
        prop = RNA_def_property(srna, "sss_enable", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_sss_enable_get",