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 <jeroen@blender.org>2020-08-17 12:09:16 +0300
committerJeroen Bakker <jeroen@blender.org>2020-08-17 12:10:32 +0300
commit68651534c26346015a70775aef1fdadab2946fb6 (patch)
tree44668e5f057268bd1084ae7ec1a6e7b9a9fb0105 /source/blender/draw/engines/eevee/eevee_renderpasses.c
parent3d47da9e4c4e492d35ab6f63391d5692ccd7aabc (diff)
Fix T77267: Render EEVEE AO pass when AO disabled.
In EEVEE the AO renderpass influenced other render passes. Until now the pass wasn't selectable when AO was disabled in the scene to remove these render artifacts. This patch allows rendering EEVEE AO pass without enabling it in the scene. It does this by binding a fallback texture that is used by the surface shaders. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7956
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_renderpasses.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_renderpasses.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_renderpasses.c b/source/blender/draw/engines/eevee/eevee_renderpasses.c
index 089d8b7a287..55fe5882211 100644
--- a/source/blender/draw/engines/eevee/eevee_renderpasses.c
+++ b/source/blender/draw/engines/eevee/eevee_renderpasses.c
@@ -90,12 +90,8 @@ void EEVEE_renderpasses_init(EEVEE_Data *vedata)
if (v3d) {
const Scene *scene = draw_ctx->scene;
eViewLayerEEVEEPassType render_pass = v3d->shading.render_pass;
- if (render_pass == EEVEE_RENDER_PASS_AO &&
- ((scene->eevee.flag & SCE_EEVEE_GTAO_ENABLED) == 0)) {
- render_pass = EEVEE_RENDER_PASS_COMBINED;
- }
- else if (render_pass == EEVEE_RENDER_PASS_BLOOM &&
- ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
+ if (render_pass == EEVEE_RENDER_PASS_BLOOM &&
+ ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
render_pass = EEVEE_RENDER_PASS_COMBINED;
}
g_data->render_passes = render_pass;
@@ -392,8 +388,6 @@ void EEVEE_renderpasses_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
((stl->g_data->render_passes & EEVEE_RENDERPASSES_LIGHT_PASS) != 0) ?
(stl->g_data->render_passes & EEVEE_RENDERPASSES_LIGHT_PASS) :
stl->g_data->render_passes;
- const DRWContextState *draw_ctx = DRW_context_state_get();
- const Scene *scene_eval = DEG_get_evaluated_scene(draw_ctx->depsgraph);
bool is_valid = (render_pass & EEVEE_RENDERPASSES_ALL) > 0;
bool needs_color_transfer = (render_pass & EEVEE_RENDERPASSES_COLOR_PASS) > 0 &&
@@ -405,12 +399,6 @@ void EEVEE_renderpasses_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
is_valid = false;
}
- /* When SSS isn't available, but the pass is requested, we mark it as invalid */
- if ((render_pass & EEVEE_RENDER_PASS_AO) != 0 &&
- (scene_eval->eevee.flag & SCE_EEVEE_GTAO_ENABLED) == 0) {
- is_valid = false;
- }
-
const int current_sample = stl->effects->taa_current_sample;
const int total_samples = stl->effects->taa_total_sample;
if ((render_pass & EEVEE_RENDERPASSES_POST_PROCESS_ON_FIRST_SAMPLE) &&
@@ -462,10 +450,10 @@ void EEVEE_renderpasses_draw_debug(EEVEE_Data *vedata)
tx = txl->color_double_buffer;
break;
case 6:
- tx = effects->gtao_horizons;
+ tx = effects->gtao_horizons_renderpass;
break;
case 7:
- tx = effects->gtao_horizons;
+ tx = effects->gtao_horizons_renderpass;
break;
case 8:
tx = effects->sss_irradiance;