diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-08-17 12:09:16 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-08-17 12:10:32 +0300 |
commit | 68651534c26346015a70775aef1fdadab2946fb6 (patch) | |
tree | 44668e5f057268bd1084ae7ec1a6e7b9a9fb0105 /source/blender/makesrna | |
parent | 3d47da9e4c4e492d35ab6f63391d5692ccd7aabc (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/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index b8a0e2358cd..317aa6bad5d 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1297,15 +1297,13 @@ static const EnumPropertyItem *rna_3DViewShading_render_pass_itemf(bContext *C, { Scene *scene = CTX_data_scene(C); - const bool ao_enabled = scene->eevee.flag & SCE_EEVEE_GTAO_ENABLED; const bool bloom_enabled = scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED; int totitem = 0; EnumPropertyItem *result = NULL; for (int i = 0; rna_enum_view3dshading_render_pass_type_items[i].identifier != NULL; i++) { const EnumPropertyItem *item = &rna_enum_view3dshading_render_pass_type_items[i]; - if (!((!ao_enabled && item->value == EEVEE_RENDER_PASS_AO) || - (!bloom_enabled && + if (!((!bloom_enabled && (item->value == EEVEE_RENDER_PASS_BLOOM || STREQ(item->name, "Effects"))))) { RNA_enum_item_add(&result, &totitem, item); } @@ -1321,9 +1319,6 @@ static int rna_3DViewShading_render_pass_get(PointerRNA *ptr) eViewLayerEEVEEPassType result = shading->render_pass; Scene *scene = rna_3DViewShading_scene(ptr); - if (result == EEVEE_RENDER_PASS_AO && ((scene->eevee.flag & SCE_EEVEE_GTAO_ENABLED) == 0)) { - result = EEVEE_RENDER_PASS_COMBINED; - } if (result == EEVEE_RENDER_PASS_BLOOM && ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) { result = EEVEE_RENDER_PASS_COMBINED; } |