Fix #122847: Show Transparent Render Pass

EEVEE has a transparent render pass that renders materials where
the render mode is set to blended. This was introduced when EEVEE-Next
was still in development, but was never fully backported.

This PR adds the missing pieces.

Pull Request: https://projects.blender.org/blender/blender/pulls/123298
This commit is contained in:
Jeroen Bakker
2024-06-17 09:35:03 +02:00
parent 8e2f51af58
commit 52d72d9fbb
3 changed files with 6 additions and 1 deletions

View File

@@ -184,6 +184,7 @@ class VIEWLAYER_PT_eevee_next_layer_passes_light(ViewLayerButtonsPanel, Panel):
col.prop(view_layer, "use_pass_environment")
col.prop(view_layer, "use_pass_shadow")
col.prop(view_layer, "use_pass_ambient_occlusion", text="Ambient Occlusion")
col.prop(view_layer_eevee, "use_pass_transparent", text="Transparent")
col = layout.column()
col.active = view_layer.use_pass_ambient_occlusion

View File

@@ -155,7 +155,10 @@ class Film {
static bool pass_is_float3(eViewLayerEEVEEPassType pass_type)
{
return pass_storage_type(pass_type) == PASS_STORAGE_COLOR &&
!ELEM(pass_type, EEVEE_RENDER_PASS_COMBINED, EEVEE_RENDER_PASS_VECTOR);
!ELEM(pass_type,
EEVEE_RENDER_PASS_COMBINED,
EEVEE_RENDER_PASS_VECTOR,
EEVEE_RENDER_PASS_TRANSPARENT);
}
/* Returns layer offset in the accumulation texture. -1 if the pass is not enabled. */

View File

@@ -611,6 +611,7 @@ void Instance::update_passes(RenderEngine *engine, Scene *scene, ViewLayer *view
CHECK_PASS_LEGACY(ENVIRONMENT, SOCK_RGBA, 3, "RGB");
CHECK_PASS_LEGACY(SHADOW, SOCK_RGBA, 3, "RGB");
CHECK_PASS_LEGACY(AO, SOCK_RGBA, 3, "RGB");
CHECK_PASS_EEVEE(TRANSPARENT, SOCK_RGBA, 4, "RGBA");
LISTBASE_FOREACH (ViewLayerAOV *, aov, &view_layer->aovs) {
if ((aov->flag & AOV_CONFLICT) != 0) {