Commit: f2801e5c6ea97411eda7a83e60e376857b9066fb
Author: Jeroen Bakker
Date:   Wed Jan 12 10:30:58 2022 +0100
Branches: tmp-gpu-shader-descriptor-2
https://developer.blender.org/rBf2801e5c6ea97411eda7a83e60e376857b9066fb

gpu_shader_3D_point*.

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

M       source/blender/gpu/intern/gpu_shader_builtin.c
M       source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl
M       source/blender/gpu/shaders/infos/gpu_shader_3D_point_info.hh

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

diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c 
b/source/blender/gpu/intern/gpu_shader_builtin.c
index 29dfad3ba06..a5a4e0309c2 100644
--- a/source/blender/gpu/intern/gpu_shader_builtin.c
+++ b/source/blender/gpu/intern/gpu_shader_builtin.c
@@ -290,33 +290,23 @@ static const GPUShaderStages 
builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = {
     [GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA] =
         {
             .name = "GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA",
-            .vert = datatoc_gpu_shader_2D_point_uniform_size_aa_vert_glsl,
-            .frag = datatoc_gpu_shader_point_uniform_color_aa_frag_glsl,
+            .create_info = "gpu_shader_2D_point_uniform_size_uniform_color_aa",
         },
     [GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA] =
         {
             .name = 
"GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA",
-            .vert = 
datatoc_gpu_shader_2D_point_uniform_size_outline_aa_vert_glsl,
-            .frag = 
datatoc_gpu_shader_point_uniform_color_outline_aa_frag_glsl,
+            .create_info = 
"gpu_shader_2D_point_uniform_size_uniform_color_outline_aa",
         },
     [GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR] =
-        {
-            .name = "GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR",
-            .vert = 
datatoc_gpu_shader_3D_point_fixed_size_varying_color_vert_glsl,
-            .frag = datatoc_gpu_shader_point_varying_color_frag_glsl,
-        },
+        {.name = "GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR",
+         .create_info = "gpu_shader_3D_point_fixed_size_varying_color"},
     [GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR] =
-        {
-            .name = "GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR",
-            .vert = 
datatoc_gpu_shader_3D_point_varying_size_varying_color_vert_glsl,
-            .frag = datatoc_gpu_shader_point_varying_color_frag_glsl,
-        },
+        {.name = "GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR",
+         .create_info = "gpu_shader_3D_point_varying_size_varying_color"},
     [GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA] =
-        {
-            .name = "GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA",
-            .vert = datatoc_gpu_shader_3D_point_uniform_size_aa_vert_glsl,
-            .frag = datatoc_gpu_shader_point_uniform_color_aa_frag_glsl,
-        },
+        {.name = "GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA",
+         .create_info = "gpu_shader_3D_point_uniform_size_uniform_color_aa",
+         .clipped_create_info = 
"gpu_shader_3D_point_uniform_size_uniform_color_aa_clipped"},
 
     [GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZE] =
         {
diff --git 
a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl 
b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl
index 3e93d0cdd50..7f143ccc28d 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl
@@ -1,3 +1,5 @@
+#pragma BLENDER_REQUIRE(gpu_shader_cfg_world_clip_lib.glsl)
+
 #ifndef USE_GPU_SHADER_CREATE_INFO
 uniform mat4 ModelViewProjectionMatrix;
 #  ifdef USE_WORLD_CLIP_PLANES
@@ -26,6 +28,6 @@ void main()
   radii /= size;
 
 #ifdef USE_WORLD_CLIP_PLANES
-  world_clip_planes_calc_clip_distance((ModelMatrix * pos_4d).xyz);
+  world_clip_planes_calc_clip_distance((clipPlanes.ModelMatrix * pos_4d).xyz);
 #endif
 }
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_3D_point_info.hh 
b/source/blender/gpu/shaders/infos/gpu_shader_3D_point_info.hh
index 06b322b2eb8..872abcdc79c 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_3D_point_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_3D_point_info.hh
@@ -47,6 +47,10 @@ 
GPU_SHADER_CREATE_INFO(gpu_shader_3D_point_uniform_size_uniform_color_aa)
     .vertex_source("gpu_shader_3D_point_uniform_size_aa_vert.glsl")
     .fragment_source("gpu_shader_point_uniform_color_aa_frag.glsl")
     .do_static_compilation(true);
+
+GPU_SHADER_CREATE_INFO(gpu_shader_3D_point_uniform_size_uniform_color_aa_clipped)
+    .additional_info("gpu_shader_3D_point_uniform_size_uniform_color_aa")
+    .additional_info("gpu_clip_planes");
 /*
     [GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA] =
         {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to