diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-06-29 15:03:55 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-06-29 15:12:03 +0300 |
commit | a5ac0375b0d5ef130d8cbdd586ae6417a5673dd9 (patch) | |
tree | 20cf3e40dbaafc6d851f4e86f022b642c550b9e4 /source | |
parent | 45fb7a1db55d5f6abd54332450b48b0d99295cd9 (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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_volumes.c | 8 |
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; |