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_lightprobes.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_lightprobes.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 1f46fee7398..4baeff7ab5e 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -314,7 +314,7 @@ void EEVEE_lightprobes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedat
const float *col = G_draw.block.colorBackground;
/* LookDev */
- EEVEE_lookdev_cache_init(vedata, &grp, psl->probe_background, wo, pinfo);
+ EEVEE_lookdev_cache_init(vedata, &grp, psl->probe_background, 1.0f, wo, pinfo);
/* END */
if (!grp && wo) {
col = &wo->horr;
@@ -328,7 +328,7 @@ void EEVEE_lightprobes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedat
switch (status) {
case GPU_MAT_SUCCESS:
grp = DRW_shgroup_material_create(gpumat, psl->probe_background);
- DRW_shgroup_uniform_float(grp, "backgroundAlpha", &stl->g_data->background_alpha, 1);
+ DRW_shgroup_uniform_float_copy(grp, "backgroundAlpha", 1.0f);
/* TODO (fclem): remove those (need to clean the GLSL files). */
DRW_shgroup_uniform_block(grp, "common_block", sldata->common_ubo);
DRW_shgroup_uniform_block(grp, "grid_block", sldata->grid_ubo);
@@ -349,7 +349,7 @@ void EEVEE_lightprobes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedat
if (grp == NULL) {
grp = DRW_shgroup_create(EEVEE_shaders_probe_default_sh_get(), psl->probe_background);
DRW_shgroup_uniform_vec3(grp, "color", col, 1);
- DRW_shgroup_uniform_float(grp, "backgroundAlpha", &stl->g_data->background_alpha, 1);
+ DRW_shgroup_uniform_float_copy(grp, "backgroundAlpha", 1.0f);
DRW_shgroup_call_add(grp, geom, NULL);
}
}
@@ -892,6 +892,8 @@ static void lightbake_render_scene_reflected(int layer, EEVEE_BakeRenderData *us
GPU_framebuffer_bind(fbl->planarref_fb);
GPU_framebuffer_clear_depth(fbl->planarref_fb, 1.0);
+ vedata->stl->g_data->background_alpha = 1.0f;
+
/* Slight modification: we handle refraction as normal
* shading and don't do SSRefraction. */