Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jbakker>2020-02-20 16:53:53 +0300
committerJeroen Bakker <jeroen@blender.org>2020-02-21 13:13:43 +0300
commitbe2bc97eba499c48e3856c8e5ec4d869e28b4d04 (patch)
tree41d8d8fd5ec205e5fa00628aaf0f1603cb5e7825 /source/blender/draw/engines/eevee/eevee_engine.c
parent1f8f4c8cfeaf02754f3259f9eb811ada0ed3499e (diff)
EEVEE: Render Passes
This patch adds new render passes to EEVEE. These passes include: * Emission * Diffuse Light * Diffuse Color * Glossy Light * Glossy Color * Environment * Volume Scattering * Volume Transmission * Bloom * Shadow With these passes it will be possible to use EEVEE effectively for compositing. During development we kept a close eye on how to get similar results compared to cycles render passes there are some differences that are related to how EEVEE works. For EEVEE we combined the passes to `Diffuse` and `Specular`. There are no transmittance or sss passes anymore. Cycles will be changed accordingly. Cycles volume transmittance is added to multiple surface col passes. For EEVEE we left the volume transmittance as a separate pass. Known Limitations * All materials that use alpha blending will not be rendered in the render passes. Other transparency modes are supported. * More GPU memory is required to store the render passes. When rendering a HD image with all render passes enabled at max extra 570MB GPU memory is required. Implementation Details An overview of render passes have been described in https://wiki.blender.org/wiki/Source/Render/EEVEE/RenderPasses Future Developments * In this implementation the materials are re-rendered for Diffuse/Glossy and Emission passes. We could use multi target rendering to improve the render speed. * Other passes can be added later * Don't render material based passes when only requesting AO or Shadow. * Add more passes to the system. These could include Cryptomatte, AOV's, Vector, ObjectID, MaterialID, UV. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D6331
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_engine.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_engine.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c
index e3b50bb2142..3337cbcc59d 100644
--- a/source/blender/draw/engines/eevee/eevee_engine.c
+++ b/source/blender/draw/engines/eevee/eevee_engine.c
@@ -151,7 +151,8 @@ void EEVEE_cache_populate(void *vedata, Object *ob)
static void eevee_cache_finish(void *vedata)
{
EEVEE_ViewLayerData *sldata = EEVEE_view_layer_data_ensure();
- EEVEE_PrivateData *g_data = ((EEVEE_Data *)vedata)->stl->g_data;
+ EEVEE_StorageList *stl = ((EEVEE_Data *)vedata)->stl;
+ EEVEE_PrivateData *g_data = stl->g_data;
const DRWContextState *draw_ctx = DRW_context_state_get();
const Scene *scene_eval = DEG_get_evaluated_scene(draw_ctx->depsgraph);
@@ -176,6 +177,9 @@ static void eevee_cache_finish(void *vedata)
if (g_data->queued_shaders_count != g_data->queued_shaders_count_prev) {
g_data->queued_shaders_count_prev = g_data->queued_shaders_count;
EEVEE_temporal_sampling_reset(vedata);
+ /* At this moment the TAA sampling will be redrawn in the next iteration.
+ * we set the taa_current_sample to 0 so the next iteration will use sample 1 */
+ stl->effects->taa_current_sample = 0;
}
}
@@ -307,6 +311,9 @@ static void eevee_draw_scene(void *vedata)
/* Volumetrics Resolve Opaque */
EEVEE_volumes_resolve(sldata, vedata);
+ /* Renderpasses */
+ EEVEE_renderpasses_output_accumulate(sldata, vedata, false);
+
/* Transparent */
/* TODO(fclem): should be its own Framebuffer.
* This is needed because dualsource blending only works with 1 color buffer. */
@@ -321,8 +328,6 @@ static void eevee_draw_scene(void *vedata)
EEVEE_draw_effects(sldata, vedata);
DRW_stats_group_end();
- EEVEE_renderpasses_output_accumulate(sldata, vedata);
-
DRW_view_set_active(NULL);
if (DRW_state_is_image_render() && (stl->effects->enabled_effects & EFFECT_SSR) &&
@@ -336,7 +341,7 @@ static void eevee_draw_scene(void *vedata)
}
}
- if ((stl->g_data->render_passes & SCE_PASS_COMBINED) > 0) {
+ if ((stl->g_data->render_passes & EEVEE_RENDER_PASS_COMBINED) != 0) {
/* Transfer result to default framebuffer. */
GPU_framebuffer_bind(dfbl->default_fb);
DRW_transform_none(stl->effects->final_tx);