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:
Diffstat (limited to 'source/blender/gpu/shaders/infos')
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_2D_flat_color_info.hh21
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_2D_image_color_info.hh14
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_2D_image_info.hh5
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_2D_nodelink_info.hh1
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_2D_smooth_color_info.hh20
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_2D_uniform_color_info.hh18
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_3D_image_info.hh13
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_3D_image_modulate_alpha_info.hh21
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_3D_line_dashed_uniform_color_info.hh18
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_3D_polyline_info.hh2
-rw-r--r--source/blender/gpu/shaders/infos/gpu_shader_line_dashed_uniform_color_info.hh15
11 files changed, 16 insertions, 132 deletions
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_2D_flat_color_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_2D_flat_color_info.hh
deleted file mode 100644
index 24a06a37a44..00000000000
--- a/source/blender/gpu/shaders/infos/gpu_shader_2D_flat_color_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_shader_create_info.hh"
-
-#include "gpu_interface_info.hh"
-
-GPU_SHADER_CREATE_INFO(gpu_shader_2D_flat_color)
- .vertex_in(0, Type::VEC2, "pos")
- .vertex_in(1, Type::VEC4, "color")
- .vertex_out(flat_color_iface)
- .fragment_out(0, Type::VEC4, "fragColor")
- .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
- .vertex_source("gpu_shader_2D_flat_color_vert.glsl")
- .fragment_source("gpu_shader_flat_color_frag.glsl")
- .additional_info("gpu_srgb_to_framebuffer_space")
- .do_static_compilation(true);
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_2D_image_color_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_2D_image_color_info.hh
deleted file mode 100644
index 021bd9ebb95..00000000000
--- a/source/blender/gpu/shaders/infos/gpu_shader_2D_image_color_info.hh
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright 2022 Blender Foundation. All rights reserved. */
-
-/** \file
- * \ingroup gpu
- */
-
-#include "gpu_shader_create_info.hh"
-
-GPU_SHADER_CREATE_INFO(gpu_shader_2D_image_color)
- .additional_info("gpu_shader_2D_image_common")
- .push_constant(Type::VEC4, "color")
- .fragment_source("gpu_shader_image_color_frag.glsl")
- .do_static_compilation(true);
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_2D_image_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_2D_image_info.hh
index 06aad15c18a..a92dca0ce90 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_2D_image_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_2D_image_info.hh
@@ -16,8 +16,3 @@ GPU_SHADER_CREATE_INFO(gpu_shader_2D_image_common)
.push_constant(Type::MAT4, "ModelViewProjectionMatrix")
.sampler(0, ImageType::FLOAT_2D, "image")
.vertex_source("gpu_shader_2D_image_vert.glsl");
-
-GPU_SHADER_CREATE_INFO(gpu_shader_2D_image)
- .additional_info("gpu_shader_2D_image_common")
- .fragment_source("gpu_shader_image_frag.glsl")
- .do_static_compilation(true);
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_2D_nodelink_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_2D_nodelink_info.hh
index 6a419242d21..c7a6635fef7 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_2D_nodelink_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_2D_nodelink_info.hh
@@ -12,6 +12,7 @@ GPU_SHADER_INTERFACE_INFO(nodelink_iface, "")
.smooth(Type::FLOAT, "colorGradient")
.smooth(Type::FLOAT, "lineU")
.flat(Type::FLOAT, "lineLength")
+ .flat(Type::FLOAT, "lineThickness")
.flat(Type::FLOAT, "dashFactor")
.flat(Type::FLOAT, "dashAlpha")
.flat(Type::INT, "isMainLine");
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_2D_smooth_color_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_2D_smooth_color_info.hh
deleted file mode 100644
index d6edeef0dfb..00000000000
--- a/source/blender/gpu/shaders/infos/gpu_shader_2D_smooth_color_info.hh
+++ /dev/null
@@ -1,20 +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_2D_smooth_color)
- .vertex_in(0, Type::VEC2, "pos")
- .vertex_in(1, Type::VEC4, "color")
- .vertex_out(smooth_color_iface)
- .fragment_out(0, Type::VEC4, "fragColor")
- .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
- .vertex_source("gpu_shader_2D_smooth_color_vert.glsl")
- .fragment_source("gpu_shader_2D_smooth_color_frag.glsl")
- .additional_info("gpu_srgb_to_framebuffer_space")
- .do_static_compilation(true);
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_2D_uniform_color_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_2D_uniform_color_info.hh
deleted file mode 100644
index 56ccc3f105c..00000000000
--- a/source/blender/gpu/shaders/infos/gpu_shader_2D_uniform_color_info.hh
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright 2022 Blender Foundation. All rights reserved. */
-
-/** \file
- * \ingroup gpu
- */
-
-#include "gpu_shader_create_info.hh"
-
-GPU_SHADER_CREATE_INFO(gpu_shader_2D_uniform_color)
- .vertex_in(0, Type::VEC2, "pos")
- .fragment_out(0, Type::VEC4, "fragColor")
- .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
- .push_constant(Type::VEC4, "color")
- .vertex_source("gpu_shader_2D_vert.glsl")
- .fragment_source("gpu_shader_uniform_color_frag.glsl")
- .additional_info("gpu_srgb_to_framebuffer_space")
- .do_static_compilation(true);
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_3D_image_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_3D_image_info.hh
index 94cf58933af..8abd140397f 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_3D_image_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_3D_image_info.hh
@@ -8,13 +8,22 @@
#include "gpu_interface_info.hh"
#include "gpu_shader_create_info.hh"
-GPU_SHADER_CREATE_INFO(gpu_shader_3D_image)
+GPU_SHADER_CREATE_INFO(gpu_shader_3D_image_common)
.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")
.sampler(0, ImageType::FLOAT_2D, "image")
- .vertex_source("gpu_shader_3D_image_vert.glsl")
+ .vertex_source("gpu_shader_3D_image_vert.glsl");
+
+GPU_SHADER_CREATE_INFO(gpu_shader_3D_image)
+ .additional_info("gpu_shader_3D_image_common")
.fragment_source("gpu_shader_image_frag.glsl")
.do_static_compilation(true);
+
+GPU_SHADER_CREATE_INFO(gpu_shader_3D_image_color)
+ .additional_info("gpu_shader_3D_image_common")
+ .push_constant(Type::VEC4, "color")
+ .fragment_source("gpu_shader_image_color_frag.glsl")
+ .do_static_compilation(true);
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);
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_3D_line_dashed_uniform_color_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_3D_line_dashed_uniform_color_info.hh
deleted file mode 100644
index 2987077ffba..00000000000
--- a/source/blender/gpu/shaders/infos/gpu_shader_3D_line_dashed_uniform_color_info.hh
+++ /dev/null
@@ -1,18 +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"
-
-/* TODO(jbakker): Skipped as data doesn't fit as push constant. */
-GPU_SHADER_CREATE_INFO(gpu_shader_3D_line_dashed_uniform_color)
- .vertex_in(0, Type::VEC3, "pos")
- .vertex_out(flat_color_iface)
- .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
- .vertex_source("gpu_shader_3D_line_dashed_uniform_color_vert.glsl")
- .fragment_source("gpu_shader_2D_line_dashed_frag.glsl")
- .do_static_compilation(true);
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_3D_polyline_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_3D_polyline_info.hh
index 6840dfe25de..396ee64454c 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_3D_polyline_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_3D_polyline_info.hh
@@ -37,7 +37,7 @@ GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_uniform_color)
GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_uniform_color_clipped)
.do_static_compilation(true)
- /* TODO(fclem): Put in an UBO to fit the 128byte requirement. */
+ /* TODO(fclem): Put in a UBO to fit the 128byte requirement. */
.push_constant(Type::MAT4, "ModelMatrix")
.push_constant(Type::VEC4, "ClipPlane")
.define("CLIP")
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_line_dashed_uniform_color_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_line_dashed_uniform_color_info.hh
index 57cb02c8484..a2ac08c689b 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_line_dashed_uniform_color_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_line_dashed_uniform_color_info.hh
@@ -13,7 +13,8 @@ GPU_SHADER_INTERFACE_INFO(gpu_shader_line_dashed_interface, "")
.no_perspective(Type::VEC2, "stipple_start") /* In screen space */
.flat(Type::VEC2, "stipple_pos"); /* In screen space */
-GPU_SHADER_CREATE_INFO(gpu_shader_line_dashed)
+GPU_SHADER_CREATE_INFO(gpu_shader_3D_line_dashed_uniform_color)
+ .vertex_in(0, Type::VEC3, "pos")
.vertex_out(flat_color_iface)
.push_constant(Type::MAT4, "ModelViewProjectionMatrix")
.push_constant(Type::VEC2, "viewport_size")
@@ -25,18 +26,8 @@ GPU_SHADER_CREATE_INFO(gpu_shader_line_dashed)
.push_constant(Type::VEC4, "color2")
.vertex_out(gpu_shader_line_dashed_interface)
.fragment_out(0, Type::VEC4, "fragColor")
- .fragment_source("gpu_shader_2D_line_dashed_frag.glsl");
-
-GPU_SHADER_CREATE_INFO(gpu_shader_2D_line_dashed_uniform_color)
- .vertex_in(0, Type::VEC2, "pos")
- .vertex_source("gpu_shader_2D_line_dashed_uniform_color_vert.glsl")
- .additional_info("gpu_shader_line_dashed")
- .do_static_compilation(true);
-
-GPU_SHADER_CREATE_INFO(gpu_shader_3D_line_dashed_uniform_color)
- .vertex_in(0, Type::VEC3, "pos")
.vertex_source("gpu_shader_3D_line_dashed_uniform_color_vert.glsl")
- .additional_info("gpu_shader_line_dashed")
+ .fragment_source("gpu_shader_2D_line_dashed_frag.glsl")
.do_static_compilation(true);
GPU_SHADER_CREATE_INFO(gpu_shader_3D_line_dashed_uniform_color_clipped)