diff options
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/CMakeLists.txt | 3 | ||||
-rw-r--r-- | source/blender/gpu/GPU_shader.h | 12 | ||||
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 3 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_shader.c | 18 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl | 14 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl | 12 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl | 12 |
7 files changed, 0 insertions, 74 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 0f7e804de9e..4f90482d16e 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -171,9 +171,6 @@ data_to_c_simple(shaders/gpu_shader_image_desaturate_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_image_overlays_merge_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_image_overlays_stereo_merge_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_image_shuffle_color_frag.glsl SRC) -data_to_c_simple(shaders/gpu_shader_image_mask_uniform_color_frag.glsl SRC) -data_to_c_simple(shaders/gpu_shader_image_modulate_alpha_frag.glsl SRC) -data_to_c_simple(shaders/gpu_shader_image_alpha_color_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_image_color_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_image_varying_color_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_3D_image_vert.glsl SRC) diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index 0ad472113c9..a19ed2d84fd 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -144,8 +144,6 @@ typedef enum eGPUBuiltinShader { GPU_SHADER_2D_IMAGE, GPU_SHADER_2D_IMAGE_COLOR, GPU_SHADER_2D_IMAGE_DESATURATE_COLOR, - GPU_SHADER_2D_IMAGE_ALPHA_COLOR, - GPU_SHADER_2D_IMAGE_ALPHA, GPU_SHADER_2D_IMAGE_RECT_COLOR, GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR, GPU_SHADER_2D_CHECKER, @@ -209,16 +207,6 @@ typedef enum eGPUBuiltinShader { GPU_SHADER_2D_IMAGE_OVERLAYS_MERGE, GPU_SHADER_2D_IMAGE_OVERLAYS_STEREO_MERGE, GPU_SHADER_2D_IMAGE_SHUFFLE_COLOR, - GPU_SHADER_2D_IMAGE_MASK_UNIFORM_COLOR, - /** - * Draw texture with alpha. Take a 3D position and a 2D texture coordinate for each vertex. - * - * \param alpha: uniform float - * \param image: uniform sampler2D - * \param texCoord: in vec2 - * \param pos: in vec3 - */ - GPU_SHADER_3D_IMAGE_MODULATE_ALPHA, /* points */ /** * Draw round points with a hardcoded size. diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 9c7cc6b5e32..813ee71eb22 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -272,9 +272,6 @@ void GPU_texture_compare_mode(GPUTexture *tex, bool use_compare); void GPU_texture_filter_mode(GPUTexture *tex, bool use_filter); void GPU_texture_mipmap_mode(GPUTexture *tex, bool use_mipmap, bool use_filter); void GPU_texture_wrap_mode(GPUTexture *tex, bool use_repeat, bool use_clamp); -void GPU_texture_filters(GPUTexture *tex, - eGPUFilterFunction min_filter, - eGPUFilterFunction mag_filter); void GPU_texture_swizzle_set(GPUTexture *tex, const char swizzle[4]); void GPU_texture_attach_framebuffer(GPUTexture *tex, struct GPUFrameBuffer *fb, int attachment); diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c index a090f061cdd..9ea798e5669 100644 --- a/source/blender/gpu/intern/gpu_shader.c +++ b/source/blender/gpu/intern/gpu_shader.c @@ -81,10 +81,7 @@ extern char datatoc_gpu_shader_image_overlays_stereo_merge_frag_glsl[]; extern char datatoc_gpu_shader_image_color_frag_glsl[]; extern char datatoc_gpu_shader_image_desaturate_frag_glsl[]; extern char datatoc_gpu_shader_image_varying_color_frag_glsl[]; -extern char datatoc_gpu_shader_image_alpha_color_frag_glsl[]; extern char datatoc_gpu_shader_image_shuffle_color_frag_glsl[]; -extern char datatoc_gpu_shader_image_mask_uniform_color_frag_glsl[]; -extern char datatoc_gpu_shader_image_modulate_alpha_frag_glsl[]; extern char datatoc_gpu_shader_3D_vert_glsl[]; extern char datatoc_gpu_shader_3D_normal_vert_glsl[]; extern char datatoc_gpu_shader_3D_flat_color_vert_glsl[]; @@ -909,16 +906,6 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = { .frag = datatoc_gpu_shader_simple_lighting_frag_glsl, }, - [GPU_SHADER_2D_IMAGE_MASK_UNIFORM_COLOR] = - { - .vert = datatoc_gpu_shader_3D_image_vert_glsl, - .frag = datatoc_gpu_shader_image_mask_uniform_color_frag_glsl, - }, - [GPU_SHADER_3D_IMAGE_MODULATE_ALPHA] = - { - .vert = datatoc_gpu_shader_3D_image_vert_glsl, - .frag = datatoc_gpu_shader_image_modulate_alpha_frag_glsl, - }, [GPU_SHADER_2D_CHECKER] = { .vert = datatoc_gpu_shader_2D_vert_glsl, @@ -971,11 +958,6 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = { .vert = datatoc_gpu_shader_2D_image_vert_glsl, .frag = datatoc_gpu_shader_image_desaturate_frag_glsl, }, - [GPU_SHADER_2D_IMAGE_ALPHA_COLOR] = - { - .vert = datatoc_gpu_shader_2D_image_vert_glsl, - .frag = datatoc_gpu_shader_image_alpha_color_frag_glsl, - }, [GPU_SHADER_2D_IMAGE_SHUFFLE_COLOR] = { .vert = datatoc_gpu_shader_2D_image_vert_glsl, diff --git a/source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl deleted file mode 100644 index cf71d4ac0c5..00000000000 --- a/source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl +++ /dev/null @@ -1,14 +0,0 @@ - -in vec2 texCoord_interp; -out vec4 fragColor; - -uniform vec4 color; -uniform sampler2D image; - -void main() -{ - fragColor = texture(image, texCoord_interp).r * color.rgba; - /* Premul by alpha (not texture alpha) - * Use blending function GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); */ - fragColor.rgb *= color.a; -} diff --git a/source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl deleted file mode 100644 index e5078d722b4..00000000000 --- a/source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl +++ /dev/null @@ -1,12 +0,0 @@ - -in vec2 texCoord_interp; -out vec4 fragColor; - -uniform sampler2D image; -uniform vec4 color; - -void main() -{ - fragColor.a = texture(image, texCoord_interp).a * color.a; - fragColor.rgb = color.rgb; -} diff --git a/source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl deleted file mode 100644 index 613352b4ac8..00000000000 --- a/source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl +++ /dev/null @@ -1,12 +0,0 @@ - -in vec2 texCoord_interp; -out vec4 fragColor; - -uniform float alpha; -uniform sampler2D image; - -void main() -{ - fragColor = texture(image, texCoord_interp); - fragColor.a *= alpha; -} |