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:
authorBrecht Van Lommel <brecht@blender.org>2022-08-31 21:09:12 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-08-31 21:51:50 +0300
commit3a605b23d02263be6bca9046e20b46a60832d971 (patch)
treeda54e85795fa142b43ed692b26d30e9322f1f927 /intern/cycles/integrator
parentb9998541e193b1f30728fc034c7a10daae183a08 (diff)
Fix T100708: Cycles bake of diffuse/glossy color not outputting alpha
Diffstat (limited to 'intern/cycles/integrator')
-rw-r--r--intern/cycles/integrator/pass_accessor.cpp6
1 files changed, 6 insertions, 0 deletions
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) {