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:
authorClément Foucault <foucault.clem@gmail.com>2019-03-13 00:02:20 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-13 00:02:39 +0300
commit41cb5658803bf3b96f18e93c74c6af66ecdb1e83 (patch)
tree077ec7abca4fa7ca1377fcd4d6d051fc0e714e17 /source/blender/draw/engines/eevee/eevee_lookdev.c
parentf16bdf1075b04ced7918d6f367e66d2f39f56724 (diff)
Fix T60902 Eevee: Environment texture partially visible on transp. render
This was due to environement not being rendered with alpha blending. So color was still written and contributed to the final render color. Now we multiply by background alpha so that it removes any background pixels intensity. For this reason this made the (incorrect) final premult unecessary.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_lookdev.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lookdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c
index d954ff3b0e2..2f89476e832 100644
--- a/source/blender/draw/engines/eevee/eevee_lookdev.c
+++ b/source/blender/draw/engines/eevee/eevee_lookdev.c
@@ -52,6 +52,7 @@ static void eevee_lookdev_lightcache_delete(EEVEE_Data *vedata)
void EEVEE_lookdev_cache_init(
EEVEE_Data *vedata, DRWShadingGroup **grp, DRWPass *pass,
+ float background_alpha,
World *UNUSED(world), EEVEE_LightProbesInfo *pinfo)
{
EEVEE_StorageList *stl = vedata->stl;
@@ -114,7 +115,7 @@ void EEVEE_lookdev_cache_init(
*grp = DRW_shgroup_create(shader, pass);
axis_angle_to_mat3_single(stl->g_data->studiolight_matrix, 'Z', v3d->shading.studiolight_rot_z);
DRW_shgroup_uniform_mat3(*grp, "StudioLightMatrix", stl->g_data->studiolight_matrix);
- DRW_shgroup_uniform_float(*grp, "backgroundAlpha", &stl->g_data->background_alpha, 1);
+ DRW_shgroup_uniform_float_copy(*grp, "backgroundAlpha", background_alpha);
DRW_shgroup_uniform_vec3(*grp, "color", background_color, 1);
DRW_shgroup_call_add(*grp, geom, NULL);
if (!pinfo) {