yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
b5ab3459
main
1#version 420 2 3struct S 4{ 5vec3 color ; 6}; 7 8layout (location = 0 )out vec3 OutColor ; 9 10flat in int u ; 11 12void GetColor1 (const S i ) 13{ 14OutColor += i .color .x ; 15} 16 17void GetColor2 (const S i ,int comp ) 18{ 19OutColor += i .color [comp ]; 20} 21 22void GetColor3 (const S i ,int comp ) 23{ 24OutColor += i .color [comp ].x ; 25} 26 27void GetColor4 (const S i ,int comp ) 28{ 29OutColor += i .color [comp ].x ; 30} 31 32void GetColor5 (const S i ,int comp ) 33{ 34OutColor += i .color ; 35} 36 37void GetColor6 (const S i ,int comp ) 38{ 39OutColor += i .color .yx [comp ]; 40} 41 42void GetColor7 (const S i ,int comp ) 43{ 44OutColor .xy += i .color .yxz .yx ; 45} 46 47void GetColor8 (const S i ,int comp ) 48{ 49OutColor += i .color .yzx .yx .x .x ; 50} 51 52void GetColor9 (const S i ,int comp ) 53{ 54OutColor .zxy += i .color ; 55} 56 57void GetColor10 (const S i ,int comp ) 58{ 59OutColor .zy += i .color .xy ; 60} 61 62void GetColor11 (const S i ,int comp ) 63{ 64OutColor .zxy .yx += i .color .xy ; 65} 66 67void GetColor12 (const S i ,int comp ) 68{ 69OutColor [comp ]+= i .color .x ; 70} 71 72void GetColor13 (const S i ,int comp ) 73{ 74OutColor .zy [comp ]+= i .color .x ; 75} 76 77void GetColor14 (const S i ,int comp ) 78{ 79OutColor .zyx [comp ]= i .color .x ; 80} 81 82void main () 83{ 84S s ; 85OutColor = vec3 (0.0 ); 86GetColor1 (s ); 87GetColor2 (s ,u ); 88GetColor3 (s ,u ); 89GetColor4 (s ,u ); 90GetColor5 (s ,u ); 91GetColor6 (s ,u ); 92GetColor7 (s ,u ); 93GetColor8 (s ,u ); 94GetColor9 (s ,u ); 95GetColor10 (s ,u ); 96GetColor11 (s ,u ); 97GetColor12 (s ,u ); 98GetColor13 (s ,u ); 99GetColor14 (s ,u ); 100}