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>2022-06-29 15:03:55 +0300
committerThomas Dinges <blender@dingto.org>2022-06-29 17:18:39 +0300
commit3db00bdcbc568afea541aa9bc46a791f532ea50d (patch)
treec921457544a062c1feeb12f427f7aa262352059d
parent9a07e7722b8e8ad9df399b3b5fbe9ff654003186 (diff)
Fix T98697: EEVEE: Regression: Missing custom property from volumetrics
The resource binding were missing from the shading group (`shgroup->uniform_attrs`), leading to no custom property UBO creation (`drw_uniform_attrs_pool_update`) when issuing the drawcall, resulting in a missing UBO bind. The fix make sure to no duplicate the bindings by creating a simple shader bind instead of a `GPUMaterial` bind. Candidate for 3.2.1 corrective release.
-rw-r--r--source/blender/draw/engines/eevee/eevee_volumes.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c
index b8bef61f8b1..8223df22ee9 100644
--- a/source/blender/draw/engines/eevee/eevee_volumes.c
+++ b/source/blender/draw/engines/eevee/eevee_volumes.c
@@ -306,11 +306,17 @@ void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata,
return;
}
+ GPUShader *sh = GPU_material_get_shader(mat);
+ if (sh == NULL) {
+ return;
+ }
+
/* TODO(fclem): Reuse main shading group to avoid shading binding cost just like for surface
* shaders. */
- DRWShadingGroup *grp = DRW_shgroup_material_create(mat, vedata->psl->volumetric_objects_ps);
+ DRWShadingGroup *grp = DRW_shgroup_create(sh, vedata->psl->volumetric_objects_ps);
grp = DRW_shgroup_volume_create_sub(scene, ob, grp, mat);
+ DRW_shgroup_add_material_resources(grp, mat);
if (grp == NULL) {
return;