Fix light groups on macos

This commit is contained in:
2024-10-04 13:44:57 +01:00
committed by Cody Winchester
parent 98d687dc91
commit 643965dbb0
3 changed files with 6 additions and 8 deletions
@@ -57,8 +57,8 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_lights_lib)
.additional_info("eevee_legacy_raytrace_lib") .additional_info("eevee_legacy_raytrace_lib")
.uniform_buf(5, "ShadowBlock", "shadow_block", Frequency::PASS) .uniform_buf(5, "ShadowBlock", "shadow_block", Frequency::PASS)
.uniform_buf(6, "LightBlock", "light_block", Frequency::PASS) .uniform_buf(6, "LightBlock", "light_block", Frequency::PASS)
.push_constant(Type::IVEC4, "lightGroups") .push_constant(Type::IVEC4, "light_groups_in")
.push_constant(Type::IVEC4, "lightGroupShadows") .push_constant(Type::IVEC4, "light_group_shadows_in")
.sampler(8, ImageType::SHADOW_2D_ARRAY, "shadowCubeTexture") .sampler(8, ImageType::SHADOW_2D_ARRAY, "shadowCubeTexture")
.sampler(9, ImageType::SHADOW_2D_ARRAY, "shadowCascadeTexture") .sampler(9, ImageType::SHADOW_2D_ARRAY, "shadowCascadeTexture")
/* GooEngine: Use slots 15,16 as others are already taken. */ /* GooEngine: Use slots 15,16 as others are already taken. */
@@ -232,10 +232,8 @@ BLI_STATIC_ASSERT_ALIGN(SSSProfileBlock, 16)
# define alphaHashScale common_block._alphaHashScale # define alphaHashScale common_block._alphaHashScale
# define cameraUvScaleBias common_block._cameraUvScaleBias # define cameraUvScaleBias common_block._cameraUvScaleBias
# define planarClipPlane common_block._planarClipPlane # define planarClipPlane common_block._planarClipPlane
/* # define lightGroups light_groups_in
# define lightGroups light_groups # define lightGroupShadows light_group_shadows_in
# define lightGroupShadows light_group_shadows
*/
/* ProbeBlock */ /* ProbeBlock */
# define probes_data probe_block._probes_data # define probes_data probe_block._probes_data
@@ -1847,10 +1847,10 @@ void DRW_shgroup_add_material_resources(DRWShadingGroup *grp, GPUMaterial *mater
int light_groups[4]; int light_groups[4];
GPU_material_light_group_bits_get(material, light_groups); GPU_material_light_group_bits_get(material, light_groups);
DRW_shgroup_uniform_ivec4_copy(grp, "lightGroups", light_groups); DRW_shgroup_uniform_ivec4_copy(grp, "light_groups_in", light_groups);
GPU_material_light_group_shadow_bits_get(material, light_groups); GPU_material_light_group_shadow_bits_get(material, light_groups);
DRW_shgroup_uniform_ivec4_copy(grp, "lightGroupShadows", light_groups); DRW_shgroup_uniform_ivec4_copy(grp, "light_group_shadows_in", light_groups);
} }
GPUVertFormat *DRW_shgroup_instance_format_array(const DRWInstanceAttrFormat attrs[], GPUVertFormat *DRW_shgroup_instance_format_array(const DRWInstanceAttrFormat attrs[],