From 3a605b23d02263be6bca9046e20b46a60832d971 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 31 Aug 2022 20:09:12 +0200 Subject: Fix T100708: Cycles bake of diffuse/glossy color not outputting alpha --- intern/cycles/integrator/pass_accessor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'intern/cycles/integrator') diff --git a/intern/cycles/integrator/pass_accessor.cpp b/intern/cycles/integrator/pass_accessor.cpp index 05318b7545b..ab056e953c2 100644 --- a/intern/cycles/integrator/pass_accessor.cpp +++ b/intern/cycles/integrator/pass_accessor.cpp @@ -191,6 +191,12 @@ bool PassAccessor::get_render_tile_pixels(const RenderBuffers *render_buffers, * had the computation done. */ if (pass_info.num_components == 3) { get_pass_float3(render_buffers, buffer_params, destination); + + /* Use alpha for colors passes. */ + if (type == PASS_DIFFUSE_COLOR || type == PASS_GLOSSY_COLOR || + type == PASS_TRANSMISSION_COLOR) { + num_written_components = destination.num_components; + } } else if (pass_info.num_components == 4) { if (destination.num_components == 3) { -- cgit v1.2.3