1 2out vec4 sk_FragColor; 3uniform vec4 colorGreen; 4uniform vec4 colorRed; 5uniform vec4 colorWhite; 6void out_half_vh(out float v) { 7 v = colorWhite.x; 8} 9void out_half2_vh2(out vec2 v) { 10 v = vec2(colorWhite.y); 11} 12void out_half3_vh3(out vec3 v) { 13 v = vec3(colorWhite.z); 14} 15void out_half4_vh4(out vec4 v) { 16 v = vec4(colorWhite.w); 17} 18void out_half2x2_vh22(out mat2 v) { 19 v = mat2(colorWhite.x); 20} 21void out_half3x3_vh33(out mat3 v) { 22 v = mat3(colorWhite.y); 23} 24void out_half4x4_vh44(out mat4 v) { 25 v = mat4(colorWhite.z); 26} 27void out_int_vi(out int v) { 28 v = int(colorWhite.x); 29} 30void out_int2_vi2(out ivec2 v) { 31 v = ivec2(int(colorWhite.y)); 32} 33void out_int3_vi3(out ivec3 v) { 34 v = ivec3(int(colorWhite.z)); 35} 36void out_int4_vi4(out ivec4 v) { 37 v = ivec4(int(colorWhite.w)); 38} 39void out_float_vf(out float v) { 40 v = colorWhite.x; 41} 42void out_float2_vf2(out vec2 v) { 43 v = vec2(colorWhite.y); 44} 45void out_float3_vf3(out vec3 v) { 46 v = vec3(colorWhite.z); 47} 48void out_float4_vf4(out vec4 v) { 49 v = vec4(colorWhite.w); 50} 51void out_float2x2_vf22(out mat2 v) { 52 v = mat2(colorWhite.x); 53} 54void out_float3x3_vf33(out mat3 v) { 55 v = mat3(colorWhite.y); 56} 57void out_float4x4_vf44(out mat4 v) { 58 v = mat4(colorWhite.z); 59} 60void out_bool_vb(out bool v) { 61 v = bool(colorWhite.x); 62} 63void out_bool2_vb2(out bvec2 v) { 64 v = bvec2(bool(colorWhite.y)); 65} 66void out_bool3_vb3(out bvec3 v) { 67 v = bvec3(bool(colorWhite.z)); 68} 69void out_bool4_vb4(out bvec4 v) { 70 v = bvec4(bool(colorWhite.w)); 71} 72vec4 main() { 73 float h; 74 out_half_vh(h); 75 vec2 h2; 76 out_half2_vh2(h2); 77 vec3 h3; 78 out_half3_vh3(h3); 79 vec4 h4; 80 out_half4_vh4(h4); 81 out_half_vh(h3.y); 82 out_half2_vh2(h3.xz); 83 out_half4_vh4(h4.zwxy); 84 mat2 h2x2; 85 out_half2x2_vh22(h2x2); 86 mat3 h3x3; 87 out_half3x3_vh33(h3x3); 88 mat4 h4x4; 89 out_half4x4_vh44(h4x4); 90 out_half3_vh3(h3x3[1]); 91 out_half_vh(h4x4[3].w); 92 out_half_vh(h2x2[0].x); 93 int i; 94 out_int_vi(i); 95 ivec2 i2; 96 out_int2_vi2(i2); 97 ivec3 i3; 98 out_int3_vi3(i3); 99 ivec4 i4; 100 out_int4_vi4(i4); 101 out_int3_vi3(i4.xyz); 102 out_int_vi(i2.y); 103 float f; 104 out_float_vf(f); 105 vec2 f2; 106 out_float2_vf2(f2); 107 vec3 f3; 108 out_float3_vf3(f3); 109 vec4 f4; 110 out_float4_vf4(f4); 111 out_float2_vf2(f3.xy); 112 out_float_vf(f2.x); 113 mat2 f2x2; 114 out_float2x2_vf22(f2x2); 115 mat3 f3x3; 116 out_float3x3_vf33(f3x3); 117 mat4 f4x4; 118 out_float4x4_vf44(f4x4); 119 out_float_vf(f2x2[0].x); 120 bool b; 121 out_bool_vb(b); 122 bvec2 b2; 123 out_bool2_vb2(b2); 124 bvec3 b3; 125 out_bool3_vb3(b3); 126 bvec4 b4; 127 out_bool4_vb4(b4); 128 out_bool2_vb2(b4.xw); 129 out_bool_vb(b3.z); 130 bool ok = true; 131 ok = ok && 1.0 == (((((h * h2.x) * h3.x) * h4.x) * h2x2[0].x) * h3x3[0].x) * h4x4[0].x; 132 ok = ok && 1.0 == (((((f * f2.x) * f3.x) * f4.x) * f2x2[0].x) * f3x3[0].x) * f4x4[0].x; 133 ok = ok && 1 == ((i * i2.x) * i3.x) * i4.x; 134 ok = ok && (((b && b2.x) && b3.x) && b4.x); 135 return ok ? colorGreen : colorRed; 136} 137