Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-09-06 00:11:27 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-09-06 00:11:35 +0300
commit755e728a98401e2ef417368332c35e949f2233b7 (patch)
tree59206c8765ca209854bf37b0a8eb28e4397cfcc5 /source/blender/gpu
parent1fcc673230bf585b2b0239d4476b94523bd0ec21 (diff)
GPU: remove 'GPU_SHADER_3D_IMAGE_MODULATE_ALPHA'
`GPU_SHADER_3D_IMAGE_MODULATE_ALPHA` can be seamlessly replaced by `GPU_SHADER_3D_IMAGE_COLOR` with no real harm done.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/CMakeLists.txt2
-rw-r--r--source/blender/gpu/GPU_shader.h9
-rw-r--r--source/blender/gpu/intern/gpu_shader_builtin.c5
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl6
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_3D_image_modulate_alpha_info.hh21
5 files changed, 0 insertions, 43 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 152df8cb592..7ceebc37fb4 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -281,7 +281,6 @@ set(GLSL_SRC
shaders/gpu_shader_image_desaturate_frag.glsl
shaders/gpu_shader_image_overlays_merge_frag.glsl
shaders/gpu_shader_image_overlays_stereo_merge_frag.glsl
- shaders/gpu_shader_image_modulate_alpha_frag.glsl
shaders/gpu_shader_image_shuffle_color_frag.glsl
shaders/gpu_shader_image_color_frag.glsl
shaders/gpu_shader_image_varying_color_frag.glsl
@@ -589,7 +588,6 @@ set(SRC_SHADER_CREATE_INFOS
shaders/infos/gpu_shader_3D_depth_only_info.hh
shaders/infos/gpu_shader_3D_flat_color_info.hh
shaders/infos/gpu_shader_3D_image_info.hh
- shaders/infos/gpu_shader_3D_image_modulate_alpha_info.hh
shaders/infos/gpu_shader_3D_point_info.hh
shaders/infos/gpu_shader_3D_polyline_info.hh
shaders/infos/gpu_shader_3D_smooth_color_info.hh
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 0db61bedc2c..35ed0f6678e 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -295,15 +295,6 @@ typedef enum eGPUBuiltinShader {
* \param pos: in vec3
*/
GPU_SHADER_3D_IMAGE_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 constant size.
diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c b/source/blender/gpu/intern/gpu_shader_builtin.c
index 7973c635cb8..2944905f2dd 100644
--- a/source/blender/gpu/intern/gpu_shader_builtin.c
+++ b/source/blender/gpu/intern/gpu_shader_builtin.c
@@ -141,11 +141,6 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = {
.name = "GPU_SHADER_3D_IMAGE_COLOR",
.create_info = "gpu_shader_3D_image_color",
},
- [GPU_SHADER_3D_IMAGE_MODULATE_ALPHA] =
- {
- .name = "GPU_SHADER_3D_IMAGE_MODULATE_ALPHA",
- .create_info = "gpu_shader_3D_image_modulate_alpha",
- },
[GPU_SHADER_2D_CHECKER] =
{
.name = "GPU_SHADER_2D_CHECKER",
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 26f96a5da32..00000000000
--- a/source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-
-void main()
-{
- fragColor = texture(image, texCoord_interp);
- fragColor.a *= alpha;
-}
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_3D_image_modulate_alpha_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_3D_image_modulate_alpha_info.hh
deleted file mode 100644
index 35ddaa5c71c..00000000000
--- a/source/blender/gpu/shaders/infos/gpu_shader_3D_image_modulate_alpha_info.hh
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright 2022 Blender Foundation. All rights reserved. */
-
-/** \file
- * \ingroup gpu
- */
-
-#include "gpu_interface_info.hh"
-#include "gpu_shader_create_info.hh"
-
-GPU_SHADER_CREATE_INFO(gpu_shader_3D_image_modulate_alpha)
- .vertex_in(0, Type::VEC3, "pos")
- .vertex_in(1, Type::VEC2, "texCoord")
- .vertex_out(smooth_tex_coord_interp_iface)
- .fragment_out(0, Type::VEC4, "fragColor")
- .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
- .push_constant(Type::FLOAT, "alpha")
- .sampler(0, ImageType::FLOAT_2D, "image", Frequency::PASS)
- .vertex_source("gpu_shader_3D_image_vert.glsl")
- .fragment_source("gpu_shader_image_modulate_alpha_frag.glsl")
- .do_static_compilation(true);