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:
authorJacques Lucke <mail@jlucke.com>2018-10-04 19:53:40 +0300
committerJacques Lucke <mail@jlucke.com>2018-10-04 19:54:08 +0300
commita2d633316bb87df4f147d9b837d875d900225988 (patch)
tree66ceb617f9e929fc961837d4a6eb6b5f132cadd1 /source/blender/gpu
parent33d89e482b9a4f0fca3366f1482b83be178a2652 (diff)
Cleanup: Remove some unneeded code
Reviewers: fclem Differential Revision: https://developer.blender.org/D3767
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/CMakeLists.txt1
-rw-r--r--source/blender/gpu/GPU_shader.h1
-rw-r--r--source/blender/gpu/intern/gpu_shader.c4
-rw-r--r--source/blender/gpu/shaders/gpu_shader_multiply_and_blend_preprocessing.glsl22
4 files changed, 0 insertions, 28 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index e8ed5de82cb..e8c3a19b77e 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -140,7 +140,6 @@ data_to_c_simple(shaders/gpu_shader_diag_stripes_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_simple_lighting_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl SRC)
-data_to_c_simple(shaders/gpu_shader_multiply_and_blend_preprocessing.glsl SRC)
data_to_c_simple(shaders/gpu_shader_flat_color_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_flat_id_frag.glsl SRC)
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 86d68ebfc58..b53e6f108e7 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -118,7 +118,6 @@ typedef enum GPUBuiltinShader {
GPU_SHADER_SIMPLE_LIGHTING_FLAT_COLOR,
GPU_SHADER_SIMPLE_LIGHTING_SMOOTH_COLOR,
GPU_SHADER_SIMPLE_LIGHTING_SMOOTH_COLOR_ALPHA,
- GPU_SHADER_MULTIPLY_AND_BLEND_PREPROCESSING,
/* for simple 2D drawing */
/**
diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c
index 4fa0fae4c87..274ad1c8c0c 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -64,7 +64,6 @@ extern char datatoc_gpu_shader_simple_lighting_frag_glsl[];
extern char datatoc_gpu_shader_simple_lighting_flat_color_frag_glsl[];
extern char datatoc_gpu_shader_simple_lighting_smooth_color_frag_glsl[];
extern char datatoc_gpu_shader_simple_lighting_smooth_color_alpha_frag_glsl[];
-extern char datatoc_gpu_shader_multiply_and_blend_preprocessing_glsl[];
extern char datatoc_gpu_shader_flat_color_frag_glsl[];
extern char datatoc_gpu_shader_flat_color_alpha_test_0_frag_glsl[];
extern char datatoc_gpu_shader_flat_id_frag_glsl[];
@@ -714,9 +713,6 @@ static const GPUShaderStages builtin_shader_stages[GPU_NUM_BUILTIN_SHADERS] = {
[GPU_SHADER_SIMPLE_LIGHTING_SMOOTH_COLOR_ALPHA] =
{ datatoc_gpu_shader_3D_normal_smooth_color_vert_glsl,
datatoc_gpu_shader_simple_lighting_smooth_color_alpha_frag_glsl },
- [GPU_SHADER_MULTIPLY_AND_BLEND_PREPROCESSING] =
- { datatoc_gpu_shader_3D_normal_smooth_color_vert_glsl,
- datatoc_gpu_shader_multiply_and_blend_preprocessing_glsl },
[GPU_SHADER_2D_IMAGE_MASK_UNIFORM_COLOR] =
{ datatoc_gpu_shader_3D_image_vert_glsl,
diff --git a/source/blender/gpu/shaders/gpu_shader_multiply_and_blend_preprocessing.glsl b/source/blender/gpu/shaders/gpu_shader_multiply_and_blend_preprocessing.glsl
deleted file mode 100644
index 88d84aeaef6..00000000000
--- a/source/blender/gpu/shaders/gpu_shader_multiply_and_blend_preprocessing.glsl
+++ /dev/null
@@ -1,22 +0,0 @@
-uniform float opacity;
-
-in vec4 finalColor;
-out vec4 fragColor;
-
-/* Blend Mode goal:
- * First multiply the foreground and background and then mix the result
- * of that with the background based on a opacity value.
- *
- * result = background * foreground * opacity + background * (1 - opacity)
- * = background * (foreground * opacity + (1 - opacity))
- * <------------------------------------>
- * computed in this shader
- *
- * Afterwards the background and the new foreground only have to be multiplied.
- */
-
-void main()
-{
- fragColor = finalColor * opacity + (1 - opacity);
- fragColor.a = finalColor.a;
-}