yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
a23adc221
master
1#version 450 core 2//TEST_DISABLED:COMPARE_GLSL: 3 4#if defined(__SLANG__ ) 5 6__import varying_struct ; 7 8VS_OUT main (VS_IN foo ) 9{ 10return doIt (foo ); 11} 12 13#else 14 15struct VS_IN 16{ 17vec4 x ; 18vec4 y ; 19}; 20 21struct VS_OUT 22{ 23vec4 color ; 24vec4 posH ; 25}; 26 27VS_OUT doIt (VS_IN i ) 28{ 29VS_OUT o ; 30o .color = i .x ; 31o .posH = i .y ; 32return o ; 33} 34 35layout (location = 0 ) 36out vec4 SLANG_out_bar_color ; 37 38layout (location = 0 ) 39in vec4 SLANG_in_foo_x ; 40 41layout (location = 1 ) 42in vec4 SLANG_in_foo_y ; 43 44void main () 45{ 46VS_OUT SLANG_tmp_0 = doIt (VS_IN (SLANG_in_foo_x ,SLANG_in_foo_y )); 47SLANG_out_bar_color = SLANG_tmp_0 .color ; 48gl_Position = SLANG_tmp_0 .posH ; 49} 50 51#endif