diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-18 15:13:23 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-18 15:17:04 +0300 |
commit | 08d008a5085bf57ba43c7aa76d51ea60b732a11a (patch) | |
tree | 0e2f86d5f9ab3b4ee74c14deccbde76c249aef49 /source/blender/gpu/intern | |
parent | 2486346f6f0418d90b714119466921ac1da477e4 (diff) |
GPU: Create Info for GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR.
This patch converts GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR shader to use
the GPUShaderCreateInfo pattern. It can be used as a reference when
converting other shaders.
In this special case the flat uniform vector cannot be used anymore as it
doesn't fit as push constants. To solve this a uniform buffer is used.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_builtin.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c b/source/blender/gpu/intern/gpu_shader_builtin.c index cae7383f885..13f1774df03 100644 --- a/source/blender/gpu/intern/gpu_shader_builtin.c +++ b/source/blender/gpu/intern/gpu_shader_builtin.c @@ -210,12 +210,9 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = { }, [GPU_SHADER_2D_IMAGE_RECT_COLOR] = {.name = "GPU_SHADER_2D_IMAGE_RECT_COLOR", .create_info = "gpu_shader_2D_image_rect_color"}, - [GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR] = - { - .name = "GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR", - .vert = datatoc_gpu_shader_2D_image_multi_rect_vert_glsl, - .frag = datatoc_gpu_shader_image_varying_color_frag_glsl, - }, + [GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR] = {.name = "GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR", + .create_info = + "gpu_shader_2D_image_multi_rect_color"}, [GPU_SHADER_3D_UNIFORM_COLOR] = { |