Blender  V3.3
overlay_edit_mode_info.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
4 
5 GPU_SHADER_INTERFACE_INFO(overlay_edit_flat_color_iface, "").flat(Type::VEC4, "finalColor");
6 GPU_SHADER_INTERFACE_INFO(overlay_edit_smooth_color_iface, "").smooth(Type::VEC4, "finalColor");
7 GPU_SHADER_INTERFACE_INFO(overlay_edit_nopersp_color_iface, "")
8  .no_perspective(Type::VEC4, "finalColor");
9 
10 /* -------------------------------------------------------------------- */
14 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_common)
15  .define("blender_srgb_to_framebuffer_space(a)", "a")
16  .sampler(0, ImageType::DEPTH_2D, "depthTex")
17  .fragment_out(0, Type::VEC4, "fragColor")
18  .push_constant(Type::BOOL, "selectFaces")
19  .push_constant(Type::BOOL, "selectEdges")
20  .push_constant(Type::FLOAT, "alpha")
21  .push_constant(Type::IVEC4, "dataMask")
22  .vertex_source("overlay_edit_mesh_vert.glsl")
23  .additional_info("draw_modelmat", "draw_globals");
24 
25 GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_vert_iface, "")
26  .smooth(Type::VEC4, "finalColor")
27  .smooth(Type::FLOAT, "vertexCrease");
28 
29 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_vert)
30  .do_static_compilation(true)
31  .builtins(BuiltinBits::POINT_SIZE)
32  .define("VERT")
33  .vertex_in(0, Type::VEC3, "pos")
34  .vertex_in(1, Type::IVEC4, "data")
35  .vertex_in(2, Type::VEC3, "vnor")
36  .vertex_out(overlay_edit_mesh_vert_iface)
37  .fragment_source("overlay_point_varying_color_frag.glsl")
38  .additional_info("overlay_edit_mesh_common");
39 
40 GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_edge_iface, "geometry_in")
41  .smooth(Type::VEC4, "finalColor_")
42  .smooth(Type::VEC4, "finalColorOuter_")
43  .smooth(Type::INT, "selectOverride_");
44 
45 GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_edge_geom_iface, "geometry_out")
46  .smooth(Type::VEC4, "finalColor")
47  .flat(Type::VEC4, "finalColorOuter")
48  .no_perspective(Type::FLOAT, "edgeCoord");
49 
50 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_edge)
51  .do_static_compilation(true)
52  .define("EDGE")
53  .vertex_in(0, Type::VEC3, "pos")
54  .vertex_in(1, Type::IVEC4, "data")
55  .vertex_in(2, Type::VEC3, "vnor")
56  .push_constant(Type::BOOL, "do_smooth_wire")
57  .vertex_out(overlay_edit_mesh_edge_iface)
58  .geometry_out(overlay_edit_mesh_edge_geom_iface)
59  .geometry_layout(PrimitiveIn::LINES, PrimitiveOut::TRIANGLE_STRIP, 4)
60  .geometry_source("overlay_edit_mesh_geom.glsl")
61  .fragment_source("overlay_edit_mesh_frag.glsl")
62  .additional_info("overlay_edit_mesh_common");
63 
64 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_edge_flat)
65  .do_static_compilation(true)
66  .define("FLAT")
67  .additional_info("overlay_edit_mesh_edge");
68 
69 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_face)
70  .do_static_compilation(true)
71  .define("FACE")
72  .vertex_in(0, Type::VEC3, "pos")
73  .vertex_in(1, Type::IVEC4, "data")
74  .vertex_in(2, Type::VEC3, "vnor")
75  .vertex_out(overlay_edit_flat_color_iface)
76  .fragment_source("overlay_varying_color.glsl")
77  .additional_info("overlay_edit_mesh_common");
78 
79 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_facedot)
80  .do_static_compilation(true)
81  .define("FACEDOT")
82  .vertex_in(0, Type::VEC3, "pos")
83  .vertex_in(1, Type::IVEC4, "data")
84  .vertex_in(2, Type::VEC4, "norAndFlag")
85  .define("vnor", "norAndFlag.xyz")
86  .vertex_out(overlay_edit_flat_color_iface)
87  .fragment_source("overlay_point_varying_color_frag.glsl")
88  .additional_info("overlay_edit_mesh_common");
89 
90 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_normal)
91  .do_static_compilation(true)
92  .vertex_in(0, Type::VEC3, "pos")
93  .vertex_in(1, Type::VEC4, "lnor")
94  .vertex_in(2, Type::VEC4, "vnor")
95  .vertex_in(3, Type::VEC4, "norAndFlag")
96  .sampler(0, ImageType::DEPTH_2D, "depthTex")
97  .push_constant(Type::FLOAT, "normalSize")
98  .push_constant(Type::FLOAT, "normalScreenSize")
99  .push_constant(Type::FLOAT, "alpha")
100  .push_constant(Type::BOOL, "isConstantScreenSizeNormals")
101  .vertex_out(overlay_edit_flat_color_iface)
102  .fragment_out(0, Type::VEC4, "fragColor")
103  .vertex_source("overlay_edit_mesh_normal_vert.glsl")
104  .fragment_source("overlay_varying_color.glsl")
105  .additional_info("draw_modelmat_instanced_attr", "draw_globals");
106 
107 GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_analysis_iface, "").smooth(Type::VEC4, "weightColor");
108 
109 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_analysis)
110  .do_static_compilation(true)
111  .vertex_in(0, Type::VEC3, "pos")
112  .vertex_in(1, Type::FLOAT, "weight")
113  .sampler(0, ImageType::FLOAT_1D, "weightTex")
114  .fragment_out(0, Type::VEC4, "fragColor")
115  .vertex_out(overlay_edit_mesh_analysis_iface)
116  .vertex_source("overlay_edit_mesh_analysis_vert.glsl")
117  .fragment_source("overlay_edit_mesh_analysis_frag.glsl")
118  .additional_info("draw_modelmat");
119 
120 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_skin_root)
121  .do_static_compilation(true)
122  .vertex_in(0, Type::VEC3, "pos")
123  .vertex_in(1, Type::FLOAT, "size")
124  .vertex_in(2, Type::VEC3, "local_pos")
125  .vertex_out(overlay_edit_flat_color_iface)
126  .fragment_out(0, Type::VEC4, "fragColor")
127  .vertex_source("overlay_edit_mesh_skin_root_vert.glsl")
128  .fragment_source("overlay_varying_color.glsl")
129  .additional_info("draw_modelmat_instanced_attr", "draw_globals");
130 
131 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_vert_clipped)
132  .do_static_compilation(true)
133  .additional_info("overlay_edit_mesh_vert", "drw_clipped");
134 
135 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_edge_clipped)
136  .do_static_compilation(true)
137  .additional_info("overlay_edit_mesh_edge", "drw_clipped");
138 
139 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_edge_flat_clipped)
140  .do_static_compilation(true)
141  .additional_info("overlay_edit_mesh_edge_flat", "drw_clipped");
142 
143 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_face_clipped)
144  .do_static_compilation(true)
145  .additional_info("overlay_edit_mesh_face", "drw_clipped");
146 
147 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_facedot_clipped)
148  .do_static_compilation(true)
149  .additional_info("overlay_edit_mesh_facedot", "drw_clipped");
150 
151 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_normal_clipped)
152  .do_static_compilation(true)
153  .additional_info("overlay_edit_mesh_normal", "drw_clipped");
154 
155 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_analysis_clipped)
156  .do_static_compilation(true)
157  .additional_info("overlay_edit_mesh_analysis", "drw_clipped");
158 
159 GPU_SHADER_CREATE_INFO(overlay_edit_mesh_skin_root_clipped)
160  .do_static_compilation(true)
161  .additional_info("overlay_edit_mesh_skin_root", "drw_clipped");
162 
165 /* -------------------------------------------------------------------- */
169 GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_iface, "geom_in")
170  .smooth(Type::FLOAT, "selectionFac")
171  .no_perspective(Type::VEC2, "stipplePos")
172  .flat(Type::VEC2, "stippleStart");
173 
174 GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_geom_iface, "geom_out")
175  .smooth(Type::FLOAT, "selectionFac")
176  .no_perspective(Type::FLOAT, "edgeCoord")
177  .no_perspective(Type::VEC2, "stipplePos")
178  .flat(Type::VEC2, "stippleStart");
179 
180 GPU_SHADER_CREATE_INFO(overlay_edit_uv_edges)
181  .do_static_compilation(true)
182  .vertex_in(0, Type::VEC2, "au")
183  .vertex_in(1, Type::INT, "flag")
184  .vertex_out(overlay_edit_uv_iface)
185  .geometry_layout(PrimitiveIn::LINES, PrimitiveOut::TRIANGLE_STRIP, 4)
186  .geometry_out(overlay_edit_uv_geom_iface)
187  .push_constant(Type::INT, "lineStyle")
188  .push_constant(Type::BOOL, "doSmoothWire")
189  .push_constant(Type::FLOAT, "alpha")
190  .push_constant(Type::FLOAT, "dashLength")
191  .fragment_out(0, Type::VEC4, "fragColor")
192  .vertex_source("overlay_edit_uv_edges_vert.glsl")
193  .geometry_source("overlay_edit_uv_edges_geom.glsl")
194  .fragment_source("overlay_edit_uv_edges_frag.glsl")
195  .additional_info("draw_mesh", "draw_globals");
196 
197 GPU_SHADER_CREATE_INFO(overlay_edit_uv_edges_select)
198  .do_static_compilation(true)
199  .define("USE_EDGE_SELECT")
200  .additional_info("overlay_edit_uv_edges");
201 
202 GPU_SHADER_CREATE_INFO(overlay_edit_uv_faces)
203  .do_static_compilation(true)
204  .vertex_in(0, Type::VEC2, "au")
205  .vertex_in(1, Type::INT, "flag")
206  .push_constant(Type::FLOAT, "uvOpacity")
207  .vertex_out(overlay_edit_flat_color_iface)
208  .fragment_out(0, Type::VEC4, "fragColor")
209  .vertex_source("overlay_edit_uv_faces_vert.glsl")
210  .fragment_source("overlay_varying_color.glsl")
211  .additional_info("draw_mesh", "draw_globals");
212 
213 GPU_SHADER_CREATE_INFO(overlay_edit_uv_face_dots)
214  .do_static_compilation(true)
215  .vertex_in(0, Type::VEC2, "au")
216  .vertex_in(1, Type::INT, "flag")
217  .push_constant(Type::FLOAT, "pointSize")
218  .vertex_out(overlay_edit_flat_color_iface)
219  .fragment_out(0, Type::VEC4, "fragColor")
220  .vertex_source("overlay_edit_uv_face_dots_vert.glsl")
221  .fragment_source("overlay_varying_color.glsl")
222  .additional_info("draw_mesh", "draw_globals");
223 
224 GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_vert_iface, "")
225  .smooth(Type::VEC4, "fillColor")
226  .smooth(Type::VEC4, "outlineColor")
227  .smooth(Type::VEC4, "radii");
228 
229 GPU_SHADER_CREATE_INFO(overlay_edit_uv_verts)
230  .do_static_compilation(true)
231  .vertex_in(0, Type::VEC2, "au")
232  .vertex_in(1, Type::INT, "flag")
233  .push_constant(Type::FLOAT, "pointSize")
234  .push_constant(Type::FLOAT, "outlineWidth")
235  .push_constant(Type::VEC4, "color")
236  .vertex_out(overlay_edit_uv_vert_iface)
237  .fragment_out(0, Type::VEC4, "fragColor")
238  .vertex_source("overlay_edit_uv_verts_vert.glsl")
239  .fragment_source("overlay_edit_uv_verts_frag.glsl")
240  .additional_info("draw_mesh", "draw_globals");
241 
242 GPU_SHADER_CREATE_INFO(overlay_edit_uv_tiled_image_borders)
243  .do_static_compilation(true)
244  .vertex_in(0, Type::VEC3, "pos")
245  .push_constant(Type::VEC4, "color")
246  .fragment_out(0, Type::VEC4, "fragColor")
247  .vertex_source("overlay_edit_uv_tiled_image_borders_vert.glsl")
248  .fragment_source("overlay_uniform_color_frag.glsl")
249  .additional_info("draw_mesh");
250 
251 GPU_SHADER_INTERFACE_INFO(edit_uv_image_iface, "").smooth(Type::VEC2, "uvs");
252 
253 GPU_SHADER_CREATE_INFO(overlay_edit_uv_stencil_image)
254  .do_static_compilation(true)
255  .vertex_in(0, Type::VEC3, "pos")
256  .vertex_out(edit_uv_image_iface)
257  .vertex_source("overlay_edit_uv_image_vert.glsl")
258  .sampler(0, ImageType::FLOAT_2D, "imgTexture")
259  .push_constant(Type::BOOL, "imgPremultiplied")
260  .push_constant(Type::BOOL, "imgAlphaBlend")
261  .push_constant(Type::VEC4, "color")
262  .fragment_out(0, Type::VEC4, "fragColor")
263  .fragment_source("overlay_image_frag.glsl")
264  .additional_info("draw_mesh");
265 
266 GPU_SHADER_CREATE_INFO(overlay_edit_uv_mask_image)
267  .do_static_compilation(true)
268  .vertex_in(0, Type::VEC3, "pos")
269  .vertex_out(edit_uv_image_iface)
270  .sampler(0, ImageType::FLOAT_2D, "imgTexture")
271  .push_constant(Type::VEC4, "color")
272  .fragment_out(0, Type::VEC4, "fragColor")
273  .vertex_source("overlay_edit_uv_image_vert.glsl")
274  .fragment_source("overlay_edit_uv_image_mask_frag.glsl")
275  .additional_info("draw_mesh");
276 
279 /* -------------------------------------------------------------------- */
283 GPU_SHADER_CREATE_INFO(overlay_edit_uv_stretching)
284  .vertex_in(0, Type::VEC2, "pos")
285  .push_constant(Type::VEC2, "aspect")
286  .vertex_out(overlay_edit_nopersp_color_iface)
287  .fragment_out(0, Type::VEC4, "fragColor")
288  .vertex_source("overlay_edit_uv_stretching_vert.glsl")
289  .fragment_source("overlay_varying_color.glsl")
290  .additional_info("draw_mesh", "draw_globals");
291 
292 GPU_SHADER_CREATE_INFO(overlay_edit_uv_stretching_area)
293  .do_static_compilation(true)
294  .vertex_in(1, Type::FLOAT, "ratio")
295  .push_constant(Type::FLOAT, "totalAreaRatio")
296  .additional_info("overlay_edit_uv_stretching");
297 
298 GPU_SHADER_CREATE_INFO(overlay_edit_uv_stretching_angle)
299  .do_static_compilation(true)
300  .define("STRETCH_ANGLE")
301  .vertex_in(1, Type::VEC2, "uv_angles")
302  .vertex_in(2, Type::FLOAT, "angle")
303  .additional_info("overlay_edit_uv_stretching");
304 
307 /* -------------------------------------------------------------------- */
311 GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type::INT, "flag");
312 
313 GPU_SHADER_CREATE_INFO(overlay_edit_curve_handle)
314  .do_static_compilation(true)
315  .typedef_source("overlay_shader_shared.h")
316  .vertex_in(0, Type::VEC3, "pos")
317  .vertex_in(1, Type::INT, "data")
318  .vertex_out(overlay_edit_curve_handle_iface)
319  .geometry_layout(PrimitiveIn::LINES, PrimitiveOut::TRIANGLE_STRIP, 10)
320  .geometry_out(overlay_edit_smooth_color_iface)
321  .push_constant(Type::BOOL, "showCurveHandles")
322  .push_constant(Type::INT, "curveHandleDisplay")
323  .fragment_out(0, Type::VEC4, "fragColor")
324  .vertex_source("overlay_edit_curve_handle_vert.glsl")
325  .geometry_source("overlay_edit_curve_handle_geom.glsl")
326  .fragment_source("overlay_varying_color.glsl")
327  .additional_info("draw_mesh", "draw_globals");
328 
329 GPU_SHADER_CREATE_INFO(overlay_edit_curve_handle_clipped)
330  .do_static_compilation(true)
331  .additional_info("overlay_edit_curve_handle", "drw_clipped");
332 
333 GPU_SHADER_CREATE_INFO(overlay_edit_curve_point)
334  .do_static_compilation(true)
335  .typedef_source("overlay_shader_shared.h")
336  .vertex_in(0, Type::VEC3, "pos")
337  .vertex_in(1, Type::INT, "data")
338  .vertex_out(overlay_edit_flat_color_iface)
339  .push_constant(Type::BOOL, "showCurveHandles")
340  .push_constant(Type::INT, "curveHandleDisplay")
341  .fragment_out(0, Type::VEC4, "fragColor")
342  .vertex_source("overlay_edit_curve_point_vert.glsl")
343  .fragment_source("overlay_point_varying_color_frag.glsl")
344  .additional_info("draw_mesh", "draw_globals");
345 
346 GPU_SHADER_CREATE_INFO(overlay_edit_curve_point_clipped)
347  .do_static_compilation(true)
348  .additional_info("overlay_edit_curve_point", "drw_clipped");
349 
350 GPU_SHADER_CREATE_INFO(overlay_edit_curve_wire)
351  .do_static_compilation(true)
352  .vertex_in(0, Type::VEC3, "pos")
353  .vertex_in(1, Type::VEC3, "nor")
354  .vertex_in(2, Type::VEC3, "tan")
355  .vertex_in(3, Type::FLOAT, "rad")
356  .push_constant(Type::FLOAT, "normalSize")
357  .vertex_out(overlay_edit_flat_color_iface)
358  .fragment_out(0, Type::VEC4, "fragColor")
359  .vertex_source("overlay_edit_curve_wire_vert.glsl")
360  .fragment_source("overlay_varying_color.glsl")
361  .additional_info("draw_modelmat", "draw_resource_id_uniform", "draw_globals");
362 
363 GPU_SHADER_CREATE_INFO(overlay_edit_curve_wire_clipped)
364  .do_static_compilation(true)
365  .additional_info("overlay_edit_curve_wire", "drw_clipped");
366 
369 /* -------------------------------------------------------------------- */
373 GPU_SHADER_CREATE_INFO(overlay_edit_lattice_point)
374  .do_static_compilation(true)
375  .vertex_in(0, Type::VEC3, "pos")
376  .vertex_in(1, Type::INT, "data")
377  .vertex_out(overlay_edit_flat_color_iface)
378  .fragment_out(0, Type::VEC4, "fragColor")
379  .vertex_source("overlay_edit_lattice_point_vert.glsl")
380  .fragment_source("overlay_point_varying_color_frag.glsl")
381  .additional_info("draw_mesh", "draw_globals");
382 
383 GPU_SHADER_CREATE_INFO(overlay_edit_lattice_point_clipped)
384  .do_static_compilation(true)
385  .additional_info("overlay_edit_lattice_point", "drw_clipped");
386 
387 GPU_SHADER_CREATE_INFO(overlay_edit_lattice_wire)
388  .do_static_compilation(true)
389  .vertex_in(0, Type::VEC3, "pos")
390  .vertex_in(1, Type::FLOAT, "weight")
391  .sampler(0, ImageType::FLOAT_1D, "weightTex")
392  .vertex_out(overlay_edit_smooth_color_iface)
393  .fragment_out(0, Type::VEC4, "fragColor")
394  .vertex_source("overlay_edit_lattice_wire_vert.glsl")
395  .fragment_source("overlay_varying_color.glsl")
396  .additional_info("draw_mesh", "draw_globals");
397 
398 GPU_SHADER_CREATE_INFO(overlay_edit_lattice_wire_clipped)
399  .do_static_compilation(true)
400  .additional_info("overlay_edit_lattice_wire", "drw_clipped");
401 
404 /* -------------------------------------------------------------------- */
408 GPU_SHADER_CREATE_INFO(overlay_edit_particle_strand)
409  .do_static_compilation(true)
410  .vertex_in(0, Type::VEC3, "pos")
411  .vertex_in(1, Type::FLOAT, "color")
412  .sampler(0, ImageType::FLOAT_1D, "weightTex")
413  .push_constant(Type::BOOL, "useWeight")
414  .vertex_out(overlay_edit_smooth_color_iface)
415  .fragment_out(0, Type::VEC4, "fragColor")
416  .vertex_source("overlay_edit_particle_strand_vert.glsl")
417  .fragment_source("overlay_varying_color.glsl")
418  .additional_info("draw_mesh", "draw_globals");
419 
420 GPU_SHADER_CREATE_INFO(overlay_edit_particle_strand_clipped)
421  .do_static_compilation(true)
422  .additional_info("overlay_edit_particle_strand", "drw_clipped");
423 
424 GPU_SHADER_CREATE_INFO(overlay_edit_particle_point)
425  .do_static_compilation(true)
426  .vertex_in(0, Type::VEC3, "pos")
427  .vertex_in(1, Type::FLOAT, "color")
428  .vertex_out(overlay_edit_flat_color_iface)
429  .fragment_out(0, Type::VEC4, "fragColor")
430  .vertex_source("overlay_edit_particle_point_vert.glsl")
431  .fragment_source("overlay_point_varying_color_frag.glsl")
432  .additional_info("draw_mesh", "draw_globals");
433 
434 GPU_SHADER_CREATE_INFO(overlay_edit_particle_point_clipped)
435  .do_static_compilation(true)
436  .additional_info("overlay_edit_particle_point", "drw_clipped");
437 
440 /* -------------------------------------------------------------------- */
444 GPU_SHADER_CREATE_INFO(overlay_edit_gpencil)
445  .typedef_source("overlay_shader_shared.h")
446  .vertex_in(0, Type::VEC3, "pos")
447  .vertex_in(1, Type::INT, "ma")
448  .vertex_in(2, Type::UINT, "vflag")
449  .vertex_in(3, Type::FLOAT, "weight")
450  .push_constant(Type::FLOAT, "normalSize")
451  .push_constant(Type::BOOL, "doMultiframe")
452  .push_constant(Type::BOOL, "doStrokeEndpoints")
453  .push_constant(Type::BOOL, "hideSelect")
454  .push_constant(Type::BOOL, "doWeightColor")
455  .push_constant(Type::FLOAT, "gpEditOpacity")
456  .push_constant(Type::VEC4, "gpEditColor")
457  .sampler(0, ImageType::FLOAT_1D, "weightTex")
458  .fragment_out(0, Type::VEC4, "fragColor")
459  .vertex_source("overlay_edit_gpencil_vert.glsl")
460  .additional_info("draw_mesh", "draw_globals");
461 
462 GPU_SHADER_CREATE_INFO(overlay_edit_gpencil_wire)
463  .do_static_compilation(true)
464  .vertex_out(overlay_edit_smooth_color_iface)
465  .fragment_source("overlay_varying_color.glsl")
466  .additional_info("overlay_edit_gpencil");
467 
468 GPU_SHADER_CREATE_INFO(overlay_edit_gpencil_wire_clipped)
469  .do_static_compilation(true)
470  .additional_info("overlay_edit_gpencil_wire", "drw_clipped");
471 
472 GPU_SHADER_CREATE_INFO(overlay_edit_gpencil_point)
473  .do_static_compilation(true)
474  .define("USE_POINTS")
475  .vertex_out(overlay_edit_flat_color_iface)
476  .fragment_source("overlay_point_varying_color_frag.glsl")
477  .additional_info("overlay_edit_gpencil");
478 
479 GPU_SHADER_CREATE_INFO(overlay_edit_gpencil_point_clipped)
480  .do_static_compilation(true)
481  .additional_info("overlay_edit_gpencil_point", "drw_clipped");
482 
483 /* TODO(fclem): Refactor this to take list of point instead of drawing 1 point per drawcall. */
484 GPU_SHADER_CREATE_INFO(overlay_edit_gpencil_guide_point)
485  .do_static_compilation(true)
486  .vertex_in(0, Type::VEC3, "pos")
487  .vertex_in(1, Type::INT, "data")
488  .vertex_out(overlay_edit_flat_color_iface)
489  .push_constant(Type::VEC3, "pPosition")
490  .push_constant(Type::FLOAT, "pSize")
491  .push_constant(Type::VEC4, "pColor")
492  .fragment_out(0, Type::VEC4, "fragColor")
493  .vertex_source("overlay_edit_gpencil_guide_vert.glsl")
494  .fragment_source("overlay_point_varying_color_frag.glsl")
495  .additional_info("draw_mesh", "draw_globals");
496 
497 GPU_SHADER_CREATE_INFO(overlay_edit_gpencil_guide_point_clipped)
498  .do_static_compilation(true)
499  .additional_info("overlay_edit_gpencil_guide_point", "drw_clipped");
500 
503 /* -------------------------------------------------------------------- */
509 GPU_SHADER_CREATE_INFO(overlay_depth_only)
510  .do_static_compilation(true)
511  .vertex_in(0, Type::VEC3, "pos")
512  .vertex_source("overlay_depth_only_vert.glsl")
513  .fragment_source("overlay_depth_only_frag.glsl")
514  .additional_info("draw_mesh");
515 
516 GPU_SHADER_CREATE_INFO(overlay_depth_only_clipped)
517  .do_static_compilation(true)
518  .additional_info("overlay_depth_only", "drw_clipped");
519 
522 /* -------------------------------------------------------------------- */
526 GPU_SHADER_CREATE_INFO(overlay_uniform_color)
527  .do_static_compilation(true)
528  .vertex_in(0, Type::VEC3, "pos")
529  .push_constant(Type::VEC4, "color")
530  .fragment_out(0, Type::VEC4, "fragColor")
531  .vertex_source("overlay_depth_only_vert.glsl")
532  .fragment_source("overlay_uniform_color_frag.glsl")
533  .additional_info("draw_mesh");
534 
535 GPU_SHADER_CREATE_INFO(overlay_uniform_color_clipped)
536  .do_static_compilation(true)
537  .additional_info("overlay_depth_only", "drw_clipped");
538 
typedef UINT(API *GHOST_WIN32_GetDpiForWindow)(HWND)
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
@ FLOAT