yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong He[SPIRV] Support `globallycoherent` and `[vk::index()]`. (#3488)e7b6de334

master
984 B37 linesraw
1#version 450
2#extension GL_EXT_mesh_shader : require
3layout(row_major) uniform;
4layout(row_major) buffer;
5layout(location = 0)
6out vec3  verts_foo_bar_baz_color_0[3];
7
8out gl_MeshPerVertexEXT
9{
10    vec4 gl_Position;
11} gl_MeshVerticesEXT[3];
12
13layout(local_size_x = 3, local_size_y = 1, local_size_z = 1) in;
14layout(max_vertices = 3) out;
15layout(max_primitives = 1) out;
16layout(triangles) out;
17void main()
18{
19    SetMeshOutputsEXT(3U, 1U);
20    if(gl_LocalInvocationIndex < 3U)
21    {
22        gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position = vec4(0.00000000000000000000, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000);
23        verts_foo_bar_baz_color_0[gl_LocalInvocationIndex] = vec3(1.00000000000000000000, 2.00000000000000000000, 3.00000000000000000000);
24    }
25    else
26    {
27    }
28    if(gl_LocalInvocationIndex < 1U)
29    {
30        gl_PrimitiveTriangleIndicesEXT[gl_LocalInvocationIndex] = uvec3(0U, 1U, 2U);
31    }
32    else
33    {
34    }
35    return;
36}
37