yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
e7b6de334
master
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{ 10vec4 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{ 19SetMeshOutputsEXT (3U ,1U ); 20if (gl_LocalInvocationIndex < 3U ) 21 { 22gl_MeshVerticesEXT [gl_LocalInvocationIndex ].gl_Position = vec4 (0.00000000000000000000 ,0.00000000000000000000 ,0.00000000000000000000 ,1.00000000000000000000 ); 23verts_foo_bar_baz_color_0 [gl_LocalInvocationIndex ]= vec3 (1.00000000000000000000 ,2.00000000000000000000 ,3.00000000000000000000 ); 24 } 25else 26 { 27 } 28if (gl_LocalInvocationIndex < 1U ) 29 { 30gl_PrimitiveTriangleIndicesEXT [gl_LocalInvocationIndex ]= uvec3 (0U ,1U ,2U ); 31 } 32else 33 { 34 } 35return ; 36} 37