10 .no_perspective(Type::VEC4,
"finalColor");
17 .define(
"blender_srgb_to_framebuffer_space(a)",
"a")
18 .sampler(0, ImageType::DEPTH_2D,
"depthTex")
19 .fragment_out(0, Type::VEC4,
"fragColor")
20 .push_constant(Type::BOOL,
"wireShading")
21 .push_constant(Type::BOOL,
"selectFace")
22 .push_constant(Type::BOOL,
"selectEdge")
23 .push_constant(Type::FLOAT,
"alpha")
24 .push_constant(Type::FLOAT,
"retopologyOffset")
25 .push_constant(Type::IVEC4,
"dataMask")
26 .additional_info(
"draw_globals");
28#ifdef WITH_METAL_BACKEND
30 .metal_backend_only(
true)
31 .define(
"blender_srgb_to_framebuffer_space(a)",
"a")
32 .sampler(0, ImageType::DEPTH_2D,
"depthTex")
33 .fragment_out(0, Type::VEC4,
"fragColor")
34 .push_constant(Type::BOOL,
"wireShading")
35 .push_constant(Type::BOOL,
"selectFace")
36 .push_constant(Type::BOOL,
"selectEdge")
37 .push_constant(Type::FLOAT,
"alpha")
38 .push_constant(Type::FLOAT,
"retopologyOffset")
39 .push_constant(Type::IVEC4,
"dataMask")
40 .vertex_source(
"overlay_edit_mesh_vert_no_geom.glsl")
41 .additional_info(
"draw_globals");
45 .do_static_compilation(
true)
46 .vertex_in(0, Type::VEC3,
"pos")
47 .push_constant(Type::FLOAT,
"retopologyOffset")
48 .vertex_source(
"overlay_edit_mesh_depth_vert.glsl")
49 .fragment_source(
"overlay_depth_only_frag.glsl")
50 .additional_info(
"draw_mesh");
53 .do_static_compilation(
true)
54 .additional_info(
"overlay_edit_mesh_depth",
"drw_clipped");
57 .smooth(Type::VEC4,
"finalColor")
58 .smooth(Type::FLOAT,
"vertexCrease");
61 .do_static_compilation(
true)
62 .builtins(BuiltinBits::POINT_SIZE)
64 .vertex_in(0, Type::VEC3,
"pos")
65 .vertex_in(1, Type::UVEC4,
"data")
66 .vertex_in(2, Type::VEC3,
"vnor")
67 .vertex_source(
"overlay_edit_mesh_vert.glsl")
68 .vertex_out(overlay_edit_mesh_vert_iface)
69 .fragment_source(
"overlay_point_varying_color_frag.glsl")
70 .additional_info(
"draw_modelmat",
"overlay_edit_mesh_common");
73 .do_static_compilation(
true)
74 .builtins(BuiltinBits::POINT_SIZE)
76 .vertex_in(0, Type::VEC3,
"pos")
77 .vertex_in(1, Type::UVEC4,
"data")
78 .vertex_in(2, Type::VEC3,
"vnor")
79 .vertex_source(
"overlay_edit_mesh_vertex_vert.glsl")
80 .vertex_out(overlay_edit_mesh_vert_iface)
81 .fragment_source(
"overlay_point_varying_color_frag.glsl")
82 .additional_info(
"draw_view",
84 "draw_resource_handle_new",
85 "overlay_edit_mesh_common");
88 .smooth(Type::VEC4,
"finalColor_")
89 .smooth(Type::VEC4,
"finalColorOuter_")
90 .smooth(Type::UINT,
"selectOverride_");
93 .smooth(Type::VEC4,
"finalColor");
95 .flat(Type::VEC4,
"finalColorOuter");
97 "geometry_noperspective_out")
98 .no_perspective(Type::FLOAT,
"edgeCoord");
101 .do_static_compilation(
true)
103 .vertex_in(0, Type::VEC3,
"pos")
104 .vertex_in(1, Type::UVEC4,
"data")
105 .vertex_in(2, Type::VEC3,
"vnor")
106 .push_constant(Type::BOOL,
"do_smooth_wire")
107 .vertex_source(
"overlay_edit_mesh_vert.glsl")
108 .vertex_out(overlay_edit_mesh_edge_iface)
109 .geometry_out(overlay_edit_mesh_edge_geom_iface)
110 .geometry_out(overlay_edit_mesh_edge_geom_flat_iface)
111 .geometry_out(overlay_edit_mesh_edge_geom_noperspective_iface)
112 .geometry_layout(PrimitiveIn::LINES, PrimitiveOut::TRIANGLE_STRIP, 4)
113 .geometry_source(
"overlay_edit_mesh_geom.glsl")
114 .fragment_source(
"overlay_edit_mesh_frag.glsl")
115 .additional_info(
"draw_modelmat",
"overlay_edit_mesh_common");
118#ifdef WITH_METAL_BACKEND
120 .metal_backend_only(
true)
121 .do_static_compilation(
true)
123 .vertex_in(0, Type::VEC3,
"pos")
124 .vertex_in(1, Type::UCHAR4,
"data")
125 .vertex_in(2, Type::VEC3_101010I2,
"vnor")
126 .push_constant(Type::BOOL,
"do_smooth_wire")
127 .vertex_out(overlay_edit_mesh_edge_geom_iface)
128 .vertex_out(overlay_edit_mesh_edge_geom_flat_iface)
129 .vertex_out(overlay_edit_mesh_edge_geom_noperspective_iface)
130 .fragment_source(
"overlay_edit_mesh_frag.glsl")
131 .additional_info(
"draw_modelmat",
"overlay_edit_mesh_common_no_geom");
136 .do_static_compilation(
true)
138 .storage_buf(0, Qualifier::READ,
"float",
"pos[]", Frequency::GEOMETRY)
139 .storage_buf(1, Qualifier::READ,
"uint",
"vnor[]", Frequency::GEOMETRY)
140 .storage_buf(2, Qualifier::READ,
"uint",
"data[]", Frequency::GEOMETRY)
141 .push_constant(Type::IVEC2,
"gpu_attr_0")
142 .push_constant(Type::IVEC2,
"gpu_attr_1")
143 .push_constant(Type::IVEC2,
"gpu_attr_2")
144 .push_constant(Type::BOOL,
"do_smooth_wire")
145 .push_constant(Type::BOOL,
"use_vertex_selection")
146 .vertex_out(overlay_edit_mesh_edge_geom_iface)
147 .vertex_out(overlay_edit_mesh_edge_geom_flat_iface)
148 .vertex_out(overlay_edit_mesh_edge_geom_noperspective_iface)
149 .vertex_source(
"overlay_edit_mesh_edge_vert.glsl")
150 .fragment_source(
"overlay_edit_mesh_frag.glsl")
151 .additional_info(
"draw_view",
153 "draw_resource_handle_new",
155 "overlay_edit_mesh_common");
158 .do_static_compilation(
true)
160 .additional_info(
"overlay_edit_mesh_edge");
162#ifdef WITH_METAL_BACKEND
164 .metal_backend_only(
true)
165 .do_static_compilation(
true)
167 .additional_info(
"overlay_edit_mesh_edge_no_geom");
171 .do_static_compilation(
true)
173 .vertex_in(0, Type::VEC3,
"pos")
174 .vertex_in(1, Type::UVEC4,
"data")
175 .vertex_source(
"overlay_edit_mesh_vert.glsl")
176 .vertex_out(overlay_edit_flat_color_iface)
177 .fragment_source(
"overlay_varying_color.glsl")
178 .additional_info(
"draw_modelmat",
"overlay_edit_mesh_common");
181 .do_static_compilation(
true)
183 .define(
"vnor",
"vec3(0.0)")
184 .vertex_in(0, Type::VEC3,
"pos")
185 .vertex_in(1, Type::UVEC4,
"data")
186 .vertex_source(
"overlay_edit_mesh_face_vert.glsl")
187 .vertex_out(overlay_edit_flat_color_iface)
188 .fragment_source(
"overlay_varying_color.glsl")
189 .additional_info(
"draw_view",
191 "draw_resource_handle_new",
192 "overlay_edit_mesh_common");
195 .do_static_compilation(
true)
197 .vertex_in(0, Type::VEC3,
"pos")
198 .vertex_in(1, Type::UVEC4,
"data")
199 .vertex_in(2, Type::VEC4,
"norAndFlag")
200 .define(
"vnor",
"norAndFlag.xyz")
201 .vertex_source(
"overlay_edit_mesh_vert.glsl")
202 .vertex_out(overlay_edit_flat_color_iface)
203 .fragment_source(
"overlay_point_varying_color_frag.glsl")
204 .additional_info(
"draw_modelmat",
"overlay_edit_mesh_common");
207 .do_static_compilation(
true)
209 .vertex_in(0, Type::VEC3,
"pos")
210 .vertex_in(1, Type::UVEC4,
"data")
211 .vertex_in(2, Type::VEC4,
"norAndFlag")
212 .define(
"vnor",
"norAndFlag.xyz")
213 .vertex_source(
"overlay_edit_mesh_facedot_vert.glsl")
214 .vertex_out(overlay_edit_flat_color_iface)
215 .fragment_source(
"overlay_point_varying_color_frag.glsl")
216 .additional_info(
"draw_view",
218 "draw_resource_handle_new",
219 "overlay_edit_mesh_common");
222 .do_static_compilation(
true)
223 .define(
"WORKAROUND_INDEX_LOAD_INCLUDE")
225 .push_constant(Type::IVEC2,
"gpu_attr_0")
226 .push_constant(Type::IVEC2,
"gpu_attr_1")
227 .vertex_in(0, Type::VEC3,
"pos")
228 .vertex_in(1, Type::VEC4,
"lnor")
229 .vertex_in(2, Type::VEC4,
"vnor")
230 .vertex_in(3, Type::VEC4,
"norAndFlag")
231 .sampler(0, ImageType::DEPTH_2D,
"depthTex")
232 .push_constant(Type::FLOAT,
"normalSize")
233 .push_constant(Type::FLOAT,
"normalScreenSize")
234 .push_constant(Type::FLOAT,
"alpha")
235 .push_constant(Type::BOOL,
"isConstantScreenSizeNormals")
236 .vertex_out(overlay_edit_flat_color_iface)
237 .fragment_out(0, Type::VEC4,
"fragColor")
238 .vertex_source(
"overlay_edit_mesh_normal_vert.glsl")
239 .fragment_source(
"overlay_varying_color.glsl")
240 .additional_info(
"draw_modelmat_instanced_attr",
"draw_globals");
245 .do_static_compilation(
true)
246 .vertex_in(0, Type::VEC3,
"pos")
247 .vertex_in(1, Type::FLOAT,
"weight")
248 .sampler(0, ImageType::FLOAT_1D,
"weightTex")
249 .fragment_out(0, Type::VEC4,
"fragColor")
250 .vertex_out(overlay_edit_mesh_analysis_iface)
251 .vertex_source(
"overlay_edit_mesh_analysis_vert.glsl")
252 .fragment_source(
"overlay_edit_mesh_analysis_frag.glsl")
253 .additional_info(
"draw_modelmat");
256 .do_static_compilation(
true)
257 .vertex_in(0, Type::VEC3,
"pos")
258 .vertex_in(1, Type::FLOAT,
"size")
259 .vertex_in(2, Type::VEC3,
"local_pos")
260 .vertex_out(overlay_edit_flat_color_iface)
261 .fragment_out(0, Type::VEC4,
"fragColor")
262 .vertex_source(
"overlay_edit_mesh_skin_root_vert.glsl")
263 .fragment_source(
"overlay_varying_color.glsl")
264 .additional_info(
"draw_modelmat_instanced_attr",
"draw_globals");
267 .do_static_compilation(
true)
268 .additional_info(
"overlay_edit_mesh_vert",
"drw_clipped");
271 .do_static_compilation(
true)
272 .additional_info(
"overlay_edit_mesh_edge",
"drw_clipped");
274#ifdef WITH_METAL_BACKEND
276 .metal_backend_only(
true)
277 .do_static_compilation(
true)
278 .additional_info(
"overlay_edit_mesh_edge_no_geom",
"drw_clipped");
282 .do_static_compilation(
true)
283 .additional_info(
"overlay_edit_mesh_edge_flat",
"drw_clipped");
285#ifdef WITH_METAL_BACKEND
287 .metal_backend_only(
true)
288 .do_static_compilation(
true)
289 .additional_info(
"overlay_edit_mesh_edge_flat_no_geom",
"drw_clipped");
293 .do_static_compilation(
true)
294 .additional_info(
"overlay_edit_mesh_face",
"drw_clipped");
297 .do_static_compilation(
true)
298 .additional_info(
"overlay_edit_mesh_facedot",
"drw_clipped");
301 .do_static_compilation(
true)
302 .additional_info(
"overlay_edit_mesh_normal",
"drw_clipped");
305 .do_static_compilation(
true)
306 .additional_info(
"overlay_edit_mesh_analysis",
"drw_clipped");
309 .do_static_compilation(
true)
310 .additional_info(
"overlay_edit_mesh_skin_root",
"drw_clipped");
320 .flat(Type::VEC2,
"stippleStart");
322 .no_perspective(Type::VEC2,
"stipplePos");
325 .smooth(Type::FLOAT,
"selectionFac");
327 .flat(Type::VEC2,
"stippleStart");
329 .no_perspective(Type::FLOAT,
"edgeCoord")
330 .no_perspective(Type::VEC2,
"stipplePos");
333 .vertex_in(0, Type::VEC2,
"au")
334 .vertex_in(1, Type::INT,
"flag")
335 .push_constant(Type::INT,
"lineStyle")
336 .push_constant(Type::BOOL,
"doSmoothWire")
337 .push_constant(Type::FLOAT,
"alpha")
338 .push_constant(Type::FLOAT,
"dashLength")
339 .fragment_out(0, Type::VEC4,
"fragColor")
340 .fragment_source(
"overlay_edit_uv_edges_frag.glsl")
341 .additional_info(
"draw_mesh",
"draw_globals");
344 .additional_info(
"overlay_edit_uv_edges_common")
345 .do_static_compilation(
true)
346 .vertex_out(overlay_edit_uv_iface)
347 .vertex_out(overlay_edit_uv_flat_iface)
348 .vertex_out(overlay_edit_uv_noperspective_iface)
349 .geometry_layout(PrimitiveIn::LINES, PrimitiveOut::TRIANGLE_STRIP, 4)
350 .geometry_out(overlay_edit_uv_geom_iface)
351 .geometry_out(overlay_edit_uv_geom_flat_iface)
352 .geometry_out(overlay_edit_uv_geom_noperspective_iface)
353 .vertex_source(
"overlay_edit_uv_edges_vert.glsl")
354 .geometry_source(
"overlay_edit_uv_edges_geom.glsl");
356#ifdef WITH_METAL_BACKEND
358 .metal_backend_only(
true)
359 .additional_info(
"overlay_edit_uv_edges_common")
360 .do_static_compilation(
true)
361 .vertex_out(overlay_edit_uv_geom_iface)
362 .vertex_out(overlay_edit_uv_geom_flat_iface)
363 .vertex_out(overlay_edit_uv_geom_noperspective_iface)
364 .vertex_source(
"overlay_edit_uv_edges_vert_no_geom.glsl");
368 .do_static_compilation(
true)
369 .define(
"USE_EDGE_SELECT")
370 .additional_info(
"overlay_edit_uv_edges");
373 .smooth(Type::FLOAT,
"selectionFac")
374 .flat(Type::VEC2,
"stippleStart")
375 .no_perspective(Type::FLOAT,
"edgeCoord")
376 .no_perspective(Type::VEC2,
"stipplePos");
379 .do_static_compilation(
true)
380 .storage_buf(0, Qualifier::READ,
"float",
"au[]", Frequency::GEOMETRY)
381 .storage_buf(1, Qualifier::READ,
"uint",
"data[]", Frequency::GEOMETRY)
382 .push_constant(Type::IVEC2,
"gpu_attr_0")
383 .push_constant(Type::IVEC2,
"gpu_attr_1")
384 .push_constant(Type::INT,
"lineStyle")
385 .push_constant(Type::BOOL,
"doSmoothWire")
386 .push_constant(Type::FLOAT,
"alpha")
387 .push_constant(Type::FLOAT,
"dashLength")
388 .specialization_constant(Type::BOOL,
"use_edge_select",
false)
389 .vertex_out(overlay_edit_uv_next_iface)
390 .fragment_out(0, Type::VEC4,
"fragColor")
391 .vertex_source(
"overlay_edit_uv_edges_next_vert.glsl")
392 .fragment_source(
"overlay_edit_uv_edges_next_frag.glsl")
393 .additional_info(
"draw_view",
395 "draw_resource_handle_new",
400 .do_static_compilation(
true)
401 .vertex_in(0, Type::VEC2,
"au")
402 .vertex_in(1, Type::UINT,
"flag")
403 .push_constant(Type::FLOAT,
"uvOpacity")
404 .vertex_out(overlay_edit_flat_color_iface)
405 .fragment_out(0, Type::VEC4,
"fragColor")
406 .vertex_source(
"overlay_edit_uv_faces_vert.glsl")
407 .fragment_source(
"overlay_varying_color.glsl")
408 .additional_info(
"draw_mesh",
"draw_globals");
411 .do_static_compilation(
true)
412 .vertex_in(0, Type::VEC2,
"au")
413 .vertex_in(1, Type::UINT,
"flag")
414 .push_constant(Type::FLOAT,
"pointSize")
415 .vertex_out(overlay_edit_flat_color_iface)
416 .fragment_out(0, Type::VEC4,
"fragColor")
417 .vertex_source(
"overlay_edit_uv_face_dots_vert.glsl")
418 .fragment_source(
"overlay_varying_color.glsl")
419 .additional_info(
"draw_mesh",
"draw_globals");
422 .smooth(Type::VEC4,
"fillColor")
423 .smooth(Type::VEC4,
"outlineColor")
424 .smooth(Type::VEC4,
"radii");
427 .do_static_compilation(
true)
428 .vertex_in(0, Type::VEC2,
"au")
429 .vertex_in(1, Type::UINT,
"flag")
430 .push_constant(Type::FLOAT,
"pointSize")
431 .push_constant(Type::FLOAT,
"outlineWidth")
432 .push_constant(Type::VEC4,
"color")
433 .vertex_out(overlay_edit_uv_vert_iface)
434 .fragment_out(0, Type::VEC4,
"fragColor")
435 .vertex_source(
"overlay_edit_uv_verts_vert.glsl")
436 .fragment_source(
"overlay_edit_uv_verts_frag.glsl")
437 .additional_info(
"draw_mesh",
"draw_globals");
440 .do_static_compilation(
true)
441 .vertex_in(0, Type::VEC3,
"pos")
442 .push_constant(Type::VEC4,
"ucolor")
443 .fragment_out(0, Type::VEC4,
"fragColor")
444 .vertex_source(
"overlay_edit_uv_tiled_image_borders_vert.glsl")
445 .fragment_source(
"overlay_uniform_color_frag.glsl")
446 .additional_info(
"draw_mesh");
451 .do_static_compilation(
true)
452 .vertex_in(0, Type::VEC3,
"pos")
453 .vertex_out(edit_uv_image_iface)
454 .vertex_source(
"overlay_edit_uv_image_vert.glsl")
455 .sampler(0, ImageType::FLOAT_2D,
"imgTexture")
456 .push_constant(Type::BOOL,
"imgPremultiplied")
457 .push_constant(Type::BOOL,
"imgAlphaBlend")
458 .push_constant(Type::VEC4,
"ucolor")
459 .fragment_out(0, Type::VEC4,
"fragColor")
460 .fragment_source(
"overlay_image_frag.glsl")
461 .additional_info(
"draw_mesh");
464 .do_static_compilation(
true)
465 .vertex_in(0, Type::VEC3,
"pos")
466 .vertex_out(edit_uv_image_iface)
467 .sampler(0, ImageType::FLOAT_2D,
"imgTexture")
468 .push_constant(Type::VEC4,
"color")
469 .push_constant(Type::FLOAT,
"opacity")
470 .fragment_out(0, Type::VEC4,
"fragColor")
471 .vertex_source(
"overlay_edit_uv_image_vert.glsl")
472 .fragment_source(
"overlay_edit_uv_image_mask_frag.glsl")
473 .additional_info(
"draw_mesh");
482 .vertex_in(0, Type::VEC2,
"pos")
483 .push_constant(Type::VEC2,
"aspect")
484 .push_constant(Type::FLOAT,
"stretch_opacity")
485 .vertex_out(overlay_edit_nopersp_color_iface)
486 .fragment_out(0, Type::VEC4,
"fragColor")
487 .vertex_source(
"overlay_edit_uv_stretching_vert.glsl")
488 .fragment_source(
"overlay_varying_color.glsl")
489 .push_constant(Type::FLOAT,
"totalAreaRatio");
492 .do_static_compilation(
true)
493 .vertex_in(1, Type::FLOAT,
"ratio")
494 .push_constant(Type::FLOAT,
"totalAreaRatio")
495 .additional_info(
"overlay_edit_uv_stretching",
"draw_mesh",
"draw_globals");
498 .do_static_compilation(
true)
499 .define(
"STRETCH_ANGLE")
500 .vertex_in(1, Type::VEC2,
"uv_angles")
501 .vertex_in(2, Type::FLOAT,
"angle")
502 .additional_info(
"overlay_edit_uv_stretching",
"draw_mesh",
"draw_globals");
513 .do_static_compilation(
true)
514 .typedef_source(
"overlay_shader_shared.h")
515 .vertex_in(0, Type::VEC3,
"pos")
516 .vertex_in(1, Type::UINT,
"data")
517 .vertex_out(overlay_edit_curve_handle_iface)
518 .geometry_layout(PrimitiveIn::LINES, PrimitiveOut::TRIANGLE_STRIP, 10)
519 .geometry_out(overlay_edit_smooth_color_iface)
520 .push_constant(Type::BOOL,
"showCurveHandles")
521 .push_constant(Type::INT,
"curveHandleDisplay")
522 .fragment_out(0, Type::VEC4,
"fragColor")
523 .vertex_source(
"overlay_edit_curve_handle_vert.glsl")
524 .geometry_source(
"overlay_edit_curve_handle_geom.glsl")
525 .fragment_source(
"overlay_varying_color.glsl")
526 .additional_info(
"draw_mesh",
"draw_globals");
528#ifdef WITH_METAL_BACKEND
530 .metal_backend_only(
true)
531 .do_static_compilation(
true)
532 .typedef_source(
"overlay_shader_shared.h")
534 .define(
"srgbTarget",
"false")
535 .vertex_in(0, Type::VEC3,
"pos")
536 .vertex_in(1, Type::UINT,
"data")
537 .vertex_out(overlay_edit_smooth_color_iface)
538 .push_constant(Type::BOOL,
"showCurveHandles")
539 .push_constant(Type::INT,
"curveHandleDisplay")
540 .fragment_out(0, Type::VEC4,
"fragColor")
541 .vertex_source(
"overlay_edit_curve_handle_vert_no_geom.glsl")
542 .fragment_source(
"overlay_varying_color.glsl")
543 .additional_info(
"draw_mesh",
"draw_globals");
547 .do_static_compilation(
true)
548 .typedef_source(
"overlay_shader_shared.h")
549 .storage_buf(0, Qualifier::READ,
"float",
"pos[]", Frequency::GEOMETRY)
550 .storage_buf(1, Qualifier::READ,
"uint",
"data[]", Frequency::GEOMETRY)
551 .push_constant(Type::IVEC2,
"gpu_attr_0")
552 .push_constant(Type::IVEC2,
"gpu_attr_1")
553 .vertex_out(overlay_edit_smooth_color_iface)
554 .push_constant(Type::BOOL,
"showCurveHandles")
555 .push_constant(Type::INT,
"curveHandleDisplay")
556 .push_constant(Type::FLOAT,
"alpha")
557 .fragment_out(0, Type::VEC4,
"fragColor")
558 .vertex_source(
"overlay_edit_curve_handle_next_vert.glsl")
559 .fragment_source(
"overlay_varying_color.glsl")
560 .additional_info(
"draw_view",
562 "draw_resource_handle_new",
567 .do_static_compilation(
true)
568 .typedef_source(
"overlay_shader_shared.h")
569 .storage_buf(0, Qualifier::READ,
"float",
"pos[]", Frequency::GEOMETRY)
570 .storage_buf(1, Qualifier::READ,
"uint",
"data[]", Frequency::GEOMETRY)
571 .storage_buf(2, Qualifier::READ,
"float",
"selection[]", Frequency::GEOMETRY)
572 .push_constant(Type::IVEC2,
"gpu_attr_0")
573 .push_constant(Type::IVEC2,
"gpu_attr_1")
574 .push_constant(Type::IVEC2,
"gpu_attr_2")
575 .vertex_out(overlay_edit_smooth_color_iface)
576 .push_constant(Type::BOOL,
"showCurveHandles")
577 .push_constant(Type::INT,
"curveHandleDisplay")
578 .fragment_out(0, Type::VEC4,
"fragColor")
579 .vertex_source(
"overlay_edit_curves_handle_next_vert.glsl")
580 .fragment_source(
"overlay_varying_color.glsl")
581 .additional_info(
"draw_view",
583 "draw_resource_handle_new",
588 .do_static_compilation(
true)
589 .additional_info(
"overlay_edit_curve_handle",
"drw_clipped");
591#ifdef WITH_METAL_BACKEND
593 .metal_backend_only(
true)
594 .do_static_compilation(
true)
595 .additional_info(
"overlay_edit_curve_handle_no_geom",
"drw_clipped");
599 .do_static_compilation(
true)
600 .typedef_source(
"overlay_shader_shared.h")
601 .vertex_in(0, Type::VEC3,
"pos")
602 .vertex_in(1, Type::UINT,
"data")
603 .vertex_out(overlay_edit_flat_color_iface)
604 .push_constant(Type::BOOL,
"showCurveHandles")
605 .push_constant(Type::INT,
"curveHandleDisplay")
606 .fragment_out(0, Type::VEC4,
"fragColor")
607 .vertex_source(
"overlay_edit_curve_point_vert.glsl")
608 .fragment_source(
"overlay_point_varying_color_frag.glsl")
609 .additional_info(
"draw_mesh",
"draw_globals");
612 .do_static_compilation(
true)
613 .additional_info(
"overlay_edit_curve_point",
"drw_clipped");
616 .do_static_compilation(
true)
617 .vertex_in(0, Type::VEC3,
"pos")
618 .vertex_in(1, Type::VEC3,
"nor")
619 .vertex_in(2, Type::VEC3,
"tan")
620 .vertex_in(3, Type::FLOAT,
"rad")
621 .push_constant(Type::FLOAT,
"normalSize")
622 .vertex_out(overlay_edit_flat_color_iface)
623 .fragment_out(0, Type::VEC4,
"fragColor")
624 .vertex_source(
"overlay_edit_curve_wire_vert.glsl")
625 .fragment_source(
"overlay_varying_color.glsl")
626 .additional_info(
"draw_modelmat",
"draw_resource_id_uniform",
"draw_globals");
629 .do_static_compilation(
true)
630 .additional_info(
"overlay_edit_curve_wire",
"drw_clipped");
633 .do_static_compilation(
true)
634 .storage_buf(0, Qualifier::READ,
"float",
"pos[]", Frequency::GEOMETRY)
635 .storage_buf(1, Qualifier::READ,
"float",
"rad[]", Frequency::GEOMETRY)
636 .storage_buf(2, Qualifier::READ,
"uint",
"nor[]", Frequency::GEOMETRY)
637 .storage_buf(3, Qualifier::READ,
"uint",
"tan[]", Frequency::GEOMETRY)
638 .push_constant(Type::IVEC2,
"gpu_attr_0")
639 .push_constant(Type::IVEC2,
"gpu_attr_1")
640 .push_constant(Type::IVEC2,
"gpu_attr_2")
641 .push_constant(Type::IVEC2,
"gpu_attr_3")
642 .push_constant(Type::FLOAT,
"normalSize")
643 .push_constant(Type::BOOL,
"use_hq_normals")
644 .vertex_out(overlay_edit_flat_color_iface)
645 .fragment_out(0, Type::VEC4,
"fragColor")
646 .vertex_source(
"overlay_edit_curve_wire_next_vert.glsl")
647 .fragment_source(
"overlay_varying_color.glsl")
648 .additional_info(
"draw_view",
650 "draw_resource_handle_new",
661 .flat(Type::UINT,
"flag")
662 .flat(Type::FLOAT,
"selection");
665 .do_static_compilation(
true)
666 .typedef_source(
"overlay_shader_shared.h")
667 .vertex_in(0, Type::VEC3,
"pos")
668 .vertex_in(1, Type::UINT,
"data")
669 .vertex_in(2, Type::FLOAT,
"selection")
670 .vertex_out(overlay_edit_curves_handle_iface)
671 .geometry_layout(PrimitiveIn::LINES, PrimitiveOut::TRIANGLE_STRIP, 10)
672 .geometry_out(overlay_edit_smooth_color_iface)
673 .fragment_out(0, Type::VEC4,
"fragColor")
674 .vertex_source(
"overlay_edit_curves_handle_vert.glsl")
675 .geometry_source(
"overlay_edit_curves_handle_geom.glsl")
676 .fragment_source(
"overlay_varying_color.glsl")
677 .additional_info(
"draw_mesh",
"draw_globals");
680 .do_static_compilation(
true)
681 .additional_info(
"overlay_edit_curves_handle",
"drw_clipped");
683#ifdef WITH_METAL_BACKEND
685 .metal_backend_only(
true)
686 .do_static_compilation(
true)
687 .typedef_source(
"overlay_shader_shared.h")
688 .vertex_in(0, Type::VEC3,
"pos")
689 .vertex_in(1, Type::UINT,
"data")
690 .vertex_in(2, Type::FLOAT,
"selection")
691 .vertex_out(overlay_edit_smooth_color_iface)
692 .fragment_out(0, Type::VEC4,
"fragColor")
693 .vertex_source(
"overlay_edit_curves_handle_vert_no_geom.glsl")
694 .fragment_source(
"overlay_varying_color.glsl")
695 .additional_info(
"draw_mesh",
"draw_globals");
698 .metal_backend_only(
true)
699 .do_static_compilation(
true)
700 .additional_info(
"overlay_edit_curves_handle_no_geom",
"drw_clipped");
710 .do_static_compilation(
true)
711 .vertex_in(0, Type::VEC3,
"pos")
712 .vertex_in(1, Type::UINT,
"data")
713 .vertex_out(overlay_edit_flat_color_iface)
714 .fragment_out(0, Type::VEC4,
"fragColor")
715 .vertex_source(
"overlay_edit_lattice_point_vert.glsl")
716 .fragment_source(
"overlay_point_varying_color_frag.glsl")
717 .additional_info(
"draw_mesh",
"draw_globals");
720 .do_static_compilation(
true)
721 .additional_info(
"overlay_edit_lattice_point",
"drw_clipped");
724 .do_static_compilation(
true)
725 .vertex_in(0, Type::VEC3,
"pos")
726 .vertex_in(1, Type::FLOAT,
"weight")
727 .sampler(0, ImageType::FLOAT_1D,
"weightTex")
728 .vertex_out(overlay_edit_smooth_color_iface)
729 .fragment_out(0, Type::VEC4,
"fragColor")
730 .vertex_source(
"overlay_edit_lattice_wire_vert.glsl")
731 .fragment_source(
"overlay_varying_color.glsl")
732 .additional_info(
"draw_mesh",
"draw_globals");
735 .do_static_compilation(
true)
736 .additional_info(
"overlay_edit_lattice_wire",
"drw_clipped");
745 .do_static_compilation(
true)
746 .vertex_in(0, Type::VEC3,
"pos")
747 .vertex_in(1, Type::FLOAT,
"selection")
748 .sampler(0, ImageType::FLOAT_1D,
"weightTex")
749 .push_constant(Type::BOOL,
"useWeight")
750 .push_constant(Type::BOOL,
"useGreasePencil")
751 .vertex_out(overlay_edit_smooth_color_iface)
752 .fragment_out(0, Type::VEC4,
"fragColor")
753 .vertex_source(
"overlay_edit_particle_strand_vert.glsl")
754 .fragment_source(
"overlay_varying_color.glsl")
755 .additional_info(
"draw_mesh",
"draw_globals");
758 .do_static_compilation(
true)
759 .additional_info(
"overlay_edit_particle_strand",
"drw_clipped");
762 .do_static_compilation(
true)
763 .vertex_in(0, Type::VEC3,
"pos")
764 .vertex_in(1, Type::FLOAT,
"selection")
765 .vertex_out(overlay_edit_flat_color_iface)
766 .sampler(0, ImageType::FLOAT_1D,
"weightTex")
767 .push_constant(Type::BOOL,
"useWeight")
768 .push_constant(Type::BOOL,
"useGreasePencil")
769 .fragment_out(0, Type::VEC4,
"fragColor")
771 .typedef_source(
"overlay_shader_shared.h")
772 .vertex_in(3, Type::UINT,
"vflag")
773 .push_constant(Type::BOOL,
"doStrokeEndpoints")
775 .vertex_source(
"overlay_edit_particle_point_vert.glsl")
776 .fragment_source(
"overlay_point_varying_color_frag.glsl")
777 .additional_info(
"draw_mesh",
"draw_globals");
780 .do_static_compilation(
true)
781 .additional_info(
"overlay_edit_particle_point",
"drw_clipped");
790 .typedef_source(
"overlay_shader_shared.h")
791 .vertex_in(0, Type::VEC3,
"pos")
792 .vertex_in(1, Type::INT,
"ma")
793 .vertex_in(2, Type::UINT,
"vflag")
794 .vertex_in(3, Type::FLOAT,
"weight")
795 .push_constant(Type::FLOAT,
"normalSize")
796 .push_constant(Type::BOOL,
"doMultiframe")
797 .push_constant(Type::BOOL,
"doStrokeEndpoints")
798 .push_constant(Type::BOOL,
"hideSelect")
799 .push_constant(Type::BOOL,
"doWeightColor")
800 .push_constant(Type::FLOAT,
"gpEditOpacity")
801 .push_constant(Type::VEC4,
"gpEditColor")
802 .sampler(0, ImageType::FLOAT_1D,
"weightTex")
803 .fragment_out(0, Type::VEC4,
"fragColor")
804 .vertex_source(
"overlay_edit_gpencil_vert.glsl")
805 .additional_info(
"draw_mesh",
"draw_globals");
808 .do_static_compilation(
true)
809 .vertex_out(overlay_edit_smooth_color_iface)
810 .fragment_source(
"overlay_varying_color.glsl")
811 .additional_info(
"overlay_edit_gpencil");
814 .do_static_compilation(
true)
815 .additional_info(
"overlay_edit_gpencil_wire",
"drw_clipped");
818 .do_static_compilation(
true)
819 .define(
"USE_POINTS")
820 .vertex_out(overlay_edit_flat_color_iface)
821 .fragment_source(
"overlay_point_varying_color_frag.glsl")
822 .additional_info(
"overlay_edit_gpencil");
825 .do_static_compilation(
true)
826 .additional_info(
"overlay_edit_gpencil_point",
"drw_clipped");
830 .do_static_compilation(
true)
831 .vertex_in(0, Type::VEC3,
"pos")
832 .vertex_in(1, Type::UINT,
"data")
833 .vertex_out(overlay_edit_flat_color_iface)
834 .push_constant(Type::VEC3,
"pPosition")
835 .push_constant(Type::FLOAT,
"pSize")
836 .push_constant(Type::VEC4,
"pColor")
837 .fragment_out(0, Type::VEC4,
"fragColor")
838 .vertex_source(
"overlay_edit_gpencil_guide_vert.glsl")
839 .fragment_source(
"overlay_point_varying_color_frag.glsl")
840 .additional_info(
"draw_mesh",
"draw_globals");
843 .do_static_compilation(
true)
844 .additional_info(
"overlay_edit_gpencil_guide_point",
"drw_clipped");
855 .do_static_compilation(
true)
856 .vertex_in(0, Type::VEC3,
"pos")
857 .vertex_source(
"overlay_depth_only_vert.glsl")
858 .fragment_source(
"overlay_depth_only_frag.glsl")
859 .additional_info(
"draw_mesh");
862 .do_static_compilation(
true)
863 .additional_info(
"overlay_depth_only",
"drw_clipped");
866 .do_static_compilation(
true)
867 .vertex_in(0, Type::VEC3,
"pos")
868 .vertex_source(
"basic_depth_vert.glsl")
869 .fragment_source(
"overlay_depth_only_frag.glsl")
870 .additional_info(
"draw_globals",
"draw_view",
"draw_modelmat_new",
"draw_resource_handle_new");
873 .do_static_compilation(
true)
874 .storage_buf(0, Qualifier::READ,
"float",
"pos[]", Frequency::GEOMETRY)
875 .push_constant(Type::IVEC2,
"gpu_attr_0")
876 .vertex_source(
"overlay_depth_only_mesh_conservative_vert.glsl")
877 .fragment_source(
"overlay_depth_only_frag.glsl")
878 .additional_info(
"draw_globals",
882 "draw_resource_handle_new");
885 .flat(Type::VEC2,
"aspect")
886 .flat(Type::VEC4,
"sspos");
888 "gp_interp_noperspective")
889 .no_perspective(Type::VEC2,
"thickness")
890 .no_perspective(Type::FLOAT,
"hardness");
893 .do_static_compilation(
true)
894 .typedef_source(
"gpencil_shader_shared.h")
895 .vertex_out(overlay_depth_only_gpencil_flat_iface)
896 .vertex_out(overlay_depth_only_gpencil_noperspective_iface)
897 .vertex_source(
"overlay_depth_only_gpencil_vert.glsl")
898 .fragment_source(
"overlay_depth_only_gpencil_frag.glsl")
899 .depth_write(DepthWrite::ANY)
900 .push_constant(Type::BOOL,
"gpStrokeOrder3d")
901 .push_constant(Type::VEC4,
"gpDepthPlane")
902 .additional_info(
"draw_view",
904 "draw_resource_handle_new",
907 "draw_object_infos_new");
910 .do_static_compilation(
true)
911 .vertex_source(
"basic_depth_pointcloud_vert.glsl")
912 .fragment_source(
"overlay_depth_only_frag.glsl")
913 .additional_info(
"draw_pointcloud_new",
917 "draw_resource_handle_new");
920 .do_static_compilation(
true)
921 .vertex_source(
"basic_depth_curves_vert.glsl")
922 .fragment_source(
"overlay_depth_only_frag.glsl")
923 .additional_info(
"draw_hair_new",
927 "draw_resource_handle_new");
936 .do_static_compilation(
true)
937 .vertex_in(0, Type::VEC3,
"pos")
938 .push_constant(Type::VEC4,
"ucolor")
939 .fragment_out(0, Type::VEC4,
"fragColor")
940 .vertex_source(
"overlay_depth_only_vert.glsl")
941 .fragment_source(
"overlay_uniform_color_frag.glsl")
942 .additional_info(
"draw_mesh");
945 .do_static_compilation(
true)
946 .push_constant(Type::VEC4,
"ucolor")
947 .fragment_out(0, Type::VEC4,
"fragColor")
948 .vertex_source(
"overlay_pointcloud_only_vert.glsl")
949 .fragment_source(
"overlay_uniform_color_frag.glsl")
950 .additional_info(
"draw_pointcloud");
953 .do_static_compilation(
true)
954 .additional_info(
"overlay_uniform_color",
"drw_clipped");
957 .do_static_compilation(
true)
958 .additional_info(
"overlay_uniform_color_pointcloud",
"drw_clipped");
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
pos overlay_edit_mesh_common