8 .fragment_out(0, Type::VEC4,
"fragColor")
9 .fragment_out(1, Type::VEC4,
"lineOutput");
12 .flat(Type::VEC4,
"finalColor")
13 .flat(Type::VEC2,
"edgeStart")
14 .no_perspective(Type::VEC2,
"edgePos");
17 .push_constant(Type::FLOAT,
"alpha")
18 .additional_info(
"draw_view");
25 .do_static_compilation(
true)
26 .vertex_in(0, Type::VEC2,
"pos")
28 .vertex_in(1, Type::MAT4,
"inst_obmat")
29 .vertex_out(overlay_armature_wire_iface)
30 .vertex_source(
"overlay_armature_sphere_outline_vert.glsl")
31 .fragment_source(
"overlay_armature_wire_frag.glsl")
32 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
35 .do_static_compilation(
true)
36 .additional_info(
"overlay_armature_sphere_outline",
"drw_clipped");
39 .flat(Type::VEC3,
"finalStateColor")
40 .flat(Type::VEC3,
"finalBoneColor")
41 .flat(Type::MAT4,
"sphereMatrix")
42 .smooth(Type::VEC3,
"viewPosition");
45 .do_static_compilation(
true)
46 .vertex_in(0, Type::VEC2,
"pos")
48 .vertex_in(1, Type::VEC4,
"color")
49 .vertex_in(2, Type::MAT4,
"inst_obmat")
50 .depth_write(DepthWrite::GREATER)
51 .vertex_out(overlay_armature_sphere_solid_iface)
52 .vertex_source(
"overlay_armature_sphere_solid_vert.glsl")
53 .fragment_source(
"overlay_armature_sphere_solid_frag.glsl")
54 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals")
55 .depth_write(DepthWrite::ANY);
58 .do_static_compilation(
true)
59 .additional_info(
"overlay_armature_sphere_solid",
"drw_clipped");
68 .smooth(Type::VEC4,
"pPos")
69 .smooth(Type::VEC3,
"vPos")
70 .smooth(Type::VEC2,
"ssPos")
71 .smooth(Type::VEC4,
"vColSize");
73 .flat(Type::INT,
"inverted");
76 .flat(Type::VEC4,
"finalColor")
77 .flat(Type::VEC2,
"edgeStart")
78 .no_perspective(Type::VEC2,
"edgePos");
81 .do_static_compilation(
true)
82 .vertex_in(0, Type::VEC3,
"pos")
84 .vertex_in(3, Type::MAT4,
"inst_obmat")
85 .vertex_out(overlay_armature_shape_outline_iface)
86 .vertex_out(overlay_armature_shape_outline_flat_iface)
87 .geometry_layout(PrimitiveIn::LINES_ADJACENCY, PrimitiveOut::LINE_STRIP, 2)
88 .geometry_out(overlay_armature_wire_iface)
89 .vertex_source(
"overlay_armature_shape_outline_vert.glsl")
90 .geometry_source(
"overlay_armature_shape_outline_geom.glsl")
91 .fragment_source(
"overlay_armature_wire_frag.glsl")
92 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
95 .metal_backend_only(
true)
96 .do_static_compilation(
true)
97 .vertex_in(0, Type::VEC3,
"pos")
99 .vertex_in(3, Type::MAT4,
"inst_obmat")
100 .vertex_out(overlay_armature_shape_outline_no_geom_iface)
101 .vertex_source(
"overlay_armature_shape_outline_vert_no_geom.glsl")
102 .fragment_source(
"overlay_armature_wire_frag.glsl")
103 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
106 .do_static_compilation(
true)
107 .storage_buf(0, Qualifier::READ,
"float",
"pos[]", Frequency::GEOMETRY)
108 .storage_buf(1, Qualifier::READ,
"mat4",
"data_buf[]")
109 .push_constant(Type::IVEC2,
"gpu_attr_0")
110 .vertex_out(overlay_armature_shape_outline_no_geom_iface)
111 .vertex_source(
"overlay_armature_shape_outline_next_vert.glsl")
112 .fragment_source(
"overlay_armature_wire_frag.glsl")
113 .additional_info(
"overlay_frag_output",
114 "overlay_armature_common",
119 .do_static_compilation(
true)
120 .additional_info(
"overlay_armature_shape_outline",
"drw_clipped");
123 .metal_backend_only(
true)
124 .do_static_compilation(
true)
125 .additional_info(
"overlay_armature_shape_outline_no_geom",
"drw_clipped");
128 .smooth(Type::VEC4,
"finalColor")
129 .flat(Type::INT,
"inverted");
132 .do_static_compilation(
true)
133 .vertex_in(0, Type::VEC3,
"pos")
134 .vertex_in(1, Type::VEC3,
"nor")
136 .vertex_in(2, Type::MAT4,
"inst_obmat")
137 .depth_write(DepthWrite::GREATER)
138 .vertex_out(overlay_armature_shape_solid_iface)
139 .vertex_source(
"overlay_armature_shape_solid_vert.glsl")
140 .fragment_source(
"overlay_armature_shape_solid_frag.glsl")
141 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
144 .do_static_compilation(
true)
145 .additional_info(
"overlay_armature_shape_solid",
"drw_clipped");
148 .flat(Type::VEC4,
"finalColor")
149 .flat(Type::FLOAT,
"wire_width")
150 .no_perspective(Type::FLOAT,
"edgeCoord");
153 .flat(Type::VEC4,
"finalColor")
154 .flat(Type::FLOAT,
"wire_width");
157 .flat(Type::VEC4,
"finalColor")
158 .flat(Type::FLOAT,
"wire_width");
161 "geometry_noperspective_out")
162 .no_perspective(Type::FLOAT,
"edgeCoord");
165 .do_static_compilation(
true)
166 .push_constant(Type::BOOL,
"do_smooth_wire")
167 .vertex_in(0, Type::VEC3,
"pos")
169 .vertex_in(2, Type::MAT4,
"inst_obmat")
170 .vertex_out(overlay_armature_shape_wire_iface)
171 .vertex_source(
"overlay_armature_shape_wire_vert.glsl")
172 .geometry_out(overlay_armature_shape_wire_geom_iface)
173 .geometry_out(overlay_armature_shape_wire_geom_noperspective_iface)
174 .geometry_layout(PrimitiveIn::LINES, PrimitiveOut::TRIANGLE_STRIP, 4)
175 .geometry_source(
"overlay_armature_shape_wire_geom.glsl")
176 .fragment_source(
"overlay_armature_shape_wire_frag.glsl")
177 .typedef_source(
"overlay_shader_shared.h")
178 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
181 .do_static_compilation(
true)
182 .additional_info(
"overlay_armature_shape_wire",
"drw_clipped");
184#ifdef WITH_METAL_BACKEND
186 .metal_backend_only(
true)
187 .do_static_compilation(
true)
188 .push_constant(Type::BOOL,
"do_smooth_wire")
189 .vertex_in(0, Type::VEC3,
"pos")
190 .vertex_in(2, Type::MAT4,
"inst_obmat")
191 .vertex_out(overlay_armature_wire_iface)
192 .vertex_source(
"overlay_armature_shape_wire_vert_no_geom.glsl")
193 .fragment_source(
"overlay_armature_wire_frag.glsl")
194 .typedef_source(
"overlay_shader_shared.h")
195 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
199 .do_static_compilation(
true)
201 .push_constant(Type::BOOL,
"do_smooth_wire")
202 .storage_buf(0, Qualifier::READ,
"float",
"pos[]", Frequency::GEOMETRY)
203 .storage_buf(1, Qualifier::READ,
"mat4",
"data_buf[]")
204 .push_constant(Type::IVEC2,
"gpu_attr_0")
205 .define(
"inst_obmat",
"data_buf[gl_InstanceID]")
206 .vertex_out(overlay_armature_shape_wire_next_iface)
207 .vertex_source(
"overlay_armature_shape_wire_next_vert.glsl")
208 .fragment_source(
"overlay_armature_shape_wire_frag.glsl")
209 .typedef_source(
"overlay_shader_shared.h")
210 .additional_info(
"overlay_frag_output",
211 "overlay_armature_common",
222 .do_static_compilation(
true)
223 .typedef_source(
"overlay_shader_shared.h")
224 .vertex_in(0, Type::VEC2,
"pos0")
225 .vertex_in(1, Type::VEC2,
"pos1")
226 .vertex_in(2, Type::VEC2,
"pos2")
228 .vertex_in(3, Type::VEC4,
"headSphere")
229 .vertex_in(4, Type::VEC4,
"tailSphere")
230 .vertex_in(5, Type::VEC4,
"outlineColorSize")
231 .vertex_in(6, Type::VEC3,
"xAxis")
232 .vertex_out(overlay_armature_wire_iface)
233 .vertex_source(
"overlay_armature_envelope_outline_vert.glsl")
234 .fragment_source(
"overlay_armature_wire_frag.glsl")
235 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
238 .do_static_compilation(
true)
239 .additional_info(
"overlay_armature_envelope_outline",
"drw_clipped");
242 .flat(Type::VEC3,
"finalStateColor")
243 .flat(Type::VEC3,
"finalBoneColor")
244 .smooth(Type::VEC3,
"normalView");
247 .do_static_compilation(
true)
248 .typedef_source(
"overlay_shader_shared.h")
249 .vertex_in(0, Type::VEC3,
"pos")
251 .vertex_in(1, Type::VEC4,
"headSphere")
252 .vertex_in(2, Type::VEC4,
"tailSphere")
253 .vertex_in(3, Type::VEC3,
"xAxis")
254 .vertex_in(4, Type::VEC3,
"stateColor")
255 .vertex_in(5, Type::VEC3,
"boneColor")
256 .vertex_out(overlay_armature_envelope_solid_iface)
257 .push_constant(Type::BOOL,
"isDistance")
258 .vertex_source(
"overlay_armature_envelope_solid_vert.glsl")
259 .fragment_source(
"overlay_armature_envelope_solid_frag.glsl")
260 .additional_info(
"overlay_frag_output",
"overlay_armature_common");
263 .do_static_compilation(
true)
264 .additional_info(
"overlay_armature_envelope_solid",
"drw_clipped");
273 .no_perspective(Type::FLOAT,
"colorFac")
274 .flat(Type::VEC4,
"finalWireColor")
275 .flat(Type::VEC4,
"finalInnerColor");
278 .do_static_compilation(
true)
279 .typedef_source(
"overlay_shader_shared.h")
281 .vertex_in(0, Type::VEC2,
"pos")
282 .vertex_in(1, Type::UINT,
"flag")
284 .vertex_in(2, Type::VEC3,
"boneStart")
285 .vertex_in(3, Type::VEC3,
"boneEnd")
287 .vertex_in(4, Type::VEC4,
"wireColor")
288 .vertex_in(5, Type::VEC4,
"boneColor")
289 .vertex_in(6, Type::VEC4,
"headColor")
290 .vertex_in(7, Type::VEC4,
"tailColor")
291 .define(
"do_wire",
"(wireColor.a > 0.0)")
292 .vertex_out(overlay_armature_stick_iface)
293 .vertex_source(
"overlay_armature_stick_vert.glsl")
294 .fragment_source(
"overlay_armature_stick_frag.glsl")
295 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
298 .do_static_compilation(
true)
299 .additional_info(
"overlay_armature_stick",
"drw_clipped");
308 .do_static_compilation(
true)
309 .typedef_source(
"overlay_shader_shared.h")
310 .vertex_in(0, Type::VEC2,
"pos")
312 .vertex_in(1, Type::VEC4,
"color")
313 .vertex_in(2, Type::MAT4,
"inst_obmat")
314 .vertex_out(overlay_armature_wire_iface)
315 .vertex_source(
"overlay_armature_dof_vert.glsl")
316 .fragment_source(
"overlay_armature_dof_solid_frag.glsl")
317 .additional_info(
"overlay_frag_output",
"overlay_armature_common",
"draw_globals");
320 .do_static_compilation(
true)
321 .additional_info(
"overlay_armature_dof",
"drw_clipped");
330 .do_static_compilation(
true)
331 .typedef_source(
"overlay_shader_shared.h")
332 .vertex_in(0, Type::VEC3,
"pos")
333 .vertex_in(1, Type::VEC4,
"color")
334 .push_constant(Type::FLOAT,
"alpha")
335 .vertex_out(overlay_armature_wire_iface)
336 .vertex_source(
"overlay_armature_wire_vert.glsl")
337 .fragment_source(
"overlay_armature_wire_frag.glsl")
338 .additional_info(
"overlay_frag_output",
"draw_mesh",
"draw_globals");
341 .do_static_compilation(
true)
342 .additional_info(
"overlay_armature_wire",
"drw_clipped");
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
pos overlay_armature_common