yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
523e9f012
master
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv -stage vertex -entry main -allow-glsl 2#version 310 es 3layout(location = 0) in highp vec4 a_position; 4layout(location = 1) in highp vec4 a_coords; 5layout(location = 0) out mediump vec3 v_color; 6 7 8// CHECK: error 31216 9layout(std140, not_a_set = 0, binding = 0) uniform buff0 { 10 mediump int ui_zero; 11}; 12 13void main() 14{ 15 gl_Position = a_position; 16 mediump vec4 coords = a_coords; 17 mediump vec4 res = coords; 18 mediump int i = 0; 19 for (;;) { res = res.yzwx + vec4(1.0); if (i == 1) break; i++; } 20 res -= vec4(2); 21 v_color = res.rgb; 22} 23