yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
4c78efd0c
master
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage vertex -entry main -allow-glsl -emit-spirv-directly 2//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage vertex -entry main -allow-glsl 3 4#version 310 es 5layout(location = 0) in highp vec4 a_position; 6layout(location = 1) in highp vec4 a_coords; 7layout(location = 0) out mediump vec4 v_color; 8layout (std140, set = 0, binding = 0) uniform buffer0 { int ui_one; }; 9 10struct S { 11 mediump float a; 12 mediump vec3 b; 13 int c; 14}; 15 16void main (void) 17{ 18 S s = S(a_coords.x, vec3(0.0), ui_one); 19 s.b = a_coords.yzw; 20 v_color = vec4(s.a, s.b.x, s.b.y, s.c); 21 gl_Position = a_position; 22 // CHECK: OpEntryPoint 23} 24