diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-05-02 01:35:49 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-05-02 01:35:49 +0300 |
commit | 0676963809a4800f1f666cd559c30885d79f66b8 (patch) | |
tree | d7971e9bee7a62e8088f97cfcd475393e457f581 /source/blender/gpu/intern | |
parent | 2a7a01b339ad60aec5ffe265411fa2f0b1589137 (diff) |
GPUShader: Port dashed line shaders to use shaderCreateInfo
This should have no functional changes.
This reduce the complexity of the shader by only supporting 2 colors.
We never use more than 2 color in practice and this makes usage not require
a UBO.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_builtin.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c b/source/blender/gpu/intern/gpu_shader_builtin.c index b0e11d85fb9..0463262b779 100644 --- a/source/blender/gpu/intern/gpu_shader_builtin.c +++ b/source/blender/gpu/intern/gpu_shader_builtin.c @@ -238,18 +238,13 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = { [GPU_SHADER_3D_POLYLINE_SMOOTH_COLOR] = {.name = "GPU_SHADER_3D_POLYLINE_SMOOTH_COLOR", .create_info = "gpu_shader_3D_polyline_smooth_color"}, - [GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR] = - { - .name = "GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR", - .vert = datatoc_gpu_shader_2D_line_dashed_uniform_color_vert_glsl, - .frag = datatoc_gpu_shader_2D_line_dashed_frag_glsl, - }, + [GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR] = {.name = "GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR", + .create_info = + "gpu_shader_2D_line_dashed_uniform_color"}, [GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR] = - { - .name = "GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR", - .vert = datatoc_gpu_shader_3D_line_dashed_uniform_color_vert_glsl, - .frag = datatoc_gpu_shader_2D_line_dashed_frag_glsl, - }, + {.name = "GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR", + .create_info = "gpu_shader_3D_line_dashed_uniform_color", + .clipped_create_info = "gpu_shader_3D_line_dashed_uniform_color_clipped"}, [GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA] = { |