yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
1643471da
master
1#version 450 2#extension GL_EXT_mesh_shader : require 3layout (row_major )uniform ; 4layout (row_major )buffer ; 5out gl_MeshPerVertexEXT 6{ 7vec4 gl_Position ; 8}gl_MeshVerticesEXT [3 ]; 9 10layout (local_size_x = 3 ,local_size_y = 1 ,local_size_z = 1 )in ; 11layout (max_vertices = 3 )out ; 12layout (max_primitives = 1 )out ; 13layout (triangles )out ; 14void main () 15{ 16SetMeshOutputsEXT (3U ,1U ); 17if (gl_LocalInvocationIndex < 3U ) 18 { 19gl_MeshVerticesEXT [gl_LocalInvocationIndex ].gl_Position .wz = vec2 (1.00000000000000000000 ,0.00000000000000000000 ); 20gl_MeshVerticesEXT [gl_LocalInvocationIndex ].gl_Position .x = 0.00000000000000000000 ; 21gl_MeshVerticesEXT [gl_LocalInvocationIndex ].gl_Position .y = 0.00000000000000000000 ; 22 } 23else 24 { 25 } 26if (gl_LocalInvocationIndex < 1U ) 27 { 28gl_PrimitiveTriangleIndicesEXT [gl_LocalInvocationIndex ]= uvec3 (0U ,1U ,2U ); 29 } 30else 31 { 32 } 33return ; 34} 35