From f0a36599007d2c5185d040202b84775ae1343785 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Mon, 5 Sep 2022 19:01:02 -0300 Subject: GPU: remove 'GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR' The only difference between `GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR` and `GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions. --- source/blender/gpu/intern/gpu_shader_builtin.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source/blender/gpu/intern') diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c b/source/blender/gpu/intern/gpu_shader_builtin.c index 2944905f2dd..8a6586e06f6 100644 --- a/source/blender/gpu/intern/gpu_shader_builtin.c +++ b/source/blender/gpu/intern/gpu_shader_builtin.c @@ -235,11 +235,6 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = { .create_info = "gpu_shader_3D_polyline_smooth_color", }, - [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", -- cgit v1.2.3