[Bf-blender-cvs] [4c8d88b4854] blender2.8: Workbench: Fix non transparent background in viewport render

Clément Foucault noreply at git.blender.org
Wed Nov 7 00:19:48 CET 2018


Commit: 4c8d88b48542e4e54c9ac143f82e085b6dddaff5
Author: Clément Foucault
Date:   Wed Nov 7 00:15:30 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB4c8d88b48542e4e54c9ac143f82e085b6dddaff5

Workbench: Fix non transparent background in viewport render

===================================================================

M	source/blender/draw/engines/workbench/workbench_data.c

===================================================================

diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c
index 94beedc144b..29a3249782d 100644
--- a/source/blender/draw/engines/workbench/workbench_data.c
+++ b/source/blender/draw/engines/workbench/workbench_data.c
@@ -53,7 +53,7 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
 
 	WORKBENCH_UBO_World *wd = &wpd->world_data;
 	wd->matcap_orientation = (wpd->shading.flag & V3D_SHADING_MATCAP_FLIP_X) != 0;
-	wd->background_alpha = (v3d || scene->r.alphamode == R_ADDSKY) ? 1.0f : 0.0f;
+	wd->background_alpha = (DRW_state_is_image_render() && scene->r.alphamode == R_ALPHAPREMUL) ? 0.0f : 1.0f;
 
 	if (!v3d || ((v3d->shading.background_type & V3D_SHADING_BACKGROUND_WORLD) &&
 	    (scene->world != NULL)))



More information about the Bf-blender-cvs mailing list