[Bf-blender-cvs] [6ae20c4229f] tmp-gpu-shader-descriptor-2: gpu_shader_2D_point_uniform_size_uniform_color_outline_aa.

Jeroen Bakker noreply at git.blender.org
Mon Jan 10 13:32:51 CET 2022


Commit: 6ae20c4229f9c203b9a88f7e49e0439d1a57afbb
Author: Jeroen Bakker
Date:   Mon Jan 10 08:40:05 2022 +0100
Branches: tmp-gpu-shader-descriptor-2
https://developer.blender.org/rB6ae20c4229f9c203b9a88f7e49e0439d1a57afbb

gpu_shader_2D_point_uniform_size_uniform_color_outline_aa.

===================================================================

M	source/blender/gpu/CMakeLists.txt
M	source/blender/gpu/shaders/infos/gpu_interface_info.hh
M	source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
A	source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_info.hh

===================================================================

diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 96eba7ada00..97216989596 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -447,6 +447,7 @@ shaders/infos/gpu_shader_2D_uv_facedots_info.hh
 shaders/infos/gpu_shader_2D_uv_edges_info.hh
 shaders/infos/gpu_shader_2D_point_varying_size_varying_color_info.hh
 shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
+shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_info.hh
 #shaders/infos/gpu_shader_todo_info.hh
 )
 
diff --git a/source/blender/gpu/shaders/infos/gpu_interface_info.hh b/source/blender/gpu/shaders/infos/gpu_interface_info.hh
index 97ead4098d8..f28bc1ad771 100644
--- a/source/blender/gpu/shaders/infos/gpu_interface_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_interface_info.hh
@@ -6,3 +6,5 @@ GPU_SHADER_INTERFACE_INFO(flat_color_iface, "").flat(Type::VEC4, "finalColor");
 GPU_SHADER_INTERFACE_INFO(no_perspective_color_iface, "").no_perspective(Type::VEC4, "finalColor");
 GPU_SHADER_INTERFACE_INFO(smooth_color_iface, "").smooth(Type::VEC4, "finalColor");
 GPU_SHADER_INTERFACE_INFO(smooth_tex_coord_interp_iface, "").smooth(Type::VEC2, "texCoord_interp");
+GPU_SHADER_INTERFACE_INFO(smooth_radii_iface, "").smooth(Type::VEC2, "radii");
+GPU_SHADER_INTERFACE_INFO(smooth_radii_outline_iface, "").smooth(Type::VEC4, "radii");
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
index b9572818be1..feed2bb1ebc 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
@@ -1,11 +1,9 @@
 #include "gpu_interface_info.hh"
 #include "gpu_shader_create_info.hh"
 
-GPU_SHADER_INTERFACE_INFO(radii_iface, "").smooth(Type::VEC2, "radii");
-
 GPU_SHADER_CREATE_INFO(gpu_shader_2D_point_uniform_size_uniform_color_aa)
     .vertex_in(0, Type::VEC2, "pos")
-    .vertex_out(radii_iface)
+    .vertex_out(smooth_radii_iface)
     .fragment_out(0, Type::VEC4, "fragColor")
     .push_constant(0, Type::MAT4, "ModelViewProjectionMatrix")
     .push_constant(16, Type::VEC4, "color")
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_info.hh
new file mode 100644
index 00000000000..9a1394f57c1
--- /dev/null
+++ b/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_info.hh
@@ -0,0 +1,15 @@
+#include "gpu_interface_info.hh"
+#include "gpu_shader_create_info.hh"
+
+GPU_SHADER_CREATE_INFO(gpu_shader_2D_point_uniform_size_uniform_color_outline_aa)
+    .vertex_in(0, Type::VEC2, "pos")
+    .vertex_out(smooth_radii_outline_iface)
+    .fragment_out(0, Type::VEC4, "fragColor")
+    .push_constant(0, Type::MAT4, "ModelViewProjectionMatrix")
+    .push_constant(20, Type::VEC4, "color")
+    .push_constant(24, Type::VEC4, "outlineColor")
+    .push_constant(28, Type::FLOAT, "size")
+    .push_constant(29, Type::FLOAT, "outlineWidth")
+    .vertex_source("gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl")
+    .fragment_source("gpu_shader_point_uniform_color_outline_aa_frag.glsl")
+    .do_static_compilation(true);



More information about the Bf-blender-cvs mailing list