Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.
1import super::{
2 bindings::{globals, TaskPayload},
3};
4enable wgpu_mesh_shader;
6var<task_payload> taskPayload: TaskPayload;
8@task
9@payload(taskPayload)
10@workgroup_size(1)
11fn task() -> @builtin(mesh_task_size) vec3<u32> {
13 // This color is multiplied against the color of each cube.
14 // Changing it modifies all cube colors.
15 taskPayload.colorMask = vec4(1.0, 1.0, 1.0, 1.0);
17 // how many mesh shaders get dispatched grows over time
18 // until it passes a gpu limit. When it hits the limit all
19 // cubes disappear, showing what can happen if you choose the
20 // wrong values.
21 return vec3u(u32(globals.time));
Contents