Commit: cf52e4a07f283352bb98e0d5fd7bd6d3482aca5c Author: Jeroen Bakker Date: Tue Nov 29 15:28:53 2022 +0100 Branches: temp-vulkan-shader https://developer.blender.org/rBcf52e4a07f283352bb98e0d5fd7bd6d3482aca5c
Add definition of gl_InstanceID. =================================================================== M source/blender/gpu/vulkan/vk_shader.cc =================================================================== diff --git a/source/blender/gpu/vulkan/vk_shader.cc b/source/blender/gpu/vulkan/vk_shader.cc index fe5db057fa5..b9f703d1406 100644 --- a/source/blender/gpu/vulkan/vk_shader.cc +++ b/source/blender/gpu/vulkan/vk_shader.cc @@ -509,6 +509,9 @@ static char *glsl_patch_get() STR_CONCAT(patch, slen, "#define gpu_BaseInstance 0\n"); STR_CONCAT(patch, slen, "#define gpu_InstanceIndex (gl_InstanceIndex + gpu_BaseInstance)\n"); + // TODO: we should remove usage of gl_InstanceID/gl_VertexID. + STR_CONCAT(patch, slen, "#define gl_InstanceID gpu_InstanceIndex\n"); + /* GLSL Backend Lib. */ STR_CONCAT(patch, slen, datatoc_glsl_shader_defines_glsl); _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
