Eevee: Fix Planar Reflection bug / background artifact.
authorClément Foucault <foucault.clem@gmail.com>
Thu, 6 Jul 2017 16:28:25 +0000 (18:28 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Thu, 6 Jul 2017 16:28:25 +0000 (18:28 +0200)
This was cause by a missing uniform.

source/blender/draw/engines/eevee/eevee_lightprobes.c

index 5ae60ff4ef6d749483ccea2aedba3aab4e0e580f..b2c21278cddff7e6dd48e883bcba91c966878aa4 100644 (file)
@@ -349,6 +349,7 @@ void EEVEE_lightprobes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_Data *veda
                                grp = DRW_shgroup_material_create(gpumat, psl->probe_background);
 
                                if (grp) {
+                                       DRW_shgroup_uniform_float(grp, "backgroundAlpha", &stl->g_data->background_alpha, 1);
                                        DRW_shgroup_call_add(grp, geom, NULL);
                                }
                                else {
@@ -363,6 +364,7 @@ void EEVEE_lightprobes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_Data *veda
                if (grp == NULL) {
                        grp = DRW_shgroup_create(e_data.probe_default_sh, 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_call_add(grp, geom, NULL);
                }
        }