blob: 968c2d264f925f88682527562b7633bcf7767f48 [file] [log] [blame]
# WARNING: This file is auto-generated. Do NOT modify it manually, but rather
# modify the generating script file. Otherwise changes will be lost!
group scalar_to_scalar "Scalar to Scalar Conversions"
case float_to_float
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output float out0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case float_to_int
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output int out0 = [ 0 | 1 | 2 | 3 | 0 | -8 | -20 | 36 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case float_to_bool
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output bool out0 = [ false | true | true | true | true | true | true | true ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case int_to_float
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output float out0 = [ 0.0 | 1.0 | 2.0 | 5.0 | 8.0 | 11.0 | -12.0 | -66.0 | -192.0 | 255.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case int_to_int
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output int out0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case int_to_bool
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output bool out0 = [ false | true | true | true | true | true | true | true | true | true ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case uint_to_float
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output float out0 = [ 0.0 | 2.0 | 3.0 | 8.0 | 9.0 | 12.0 | 10.0 | 45.0 | 193.0 | 255.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case uint_to_int
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output int out0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case uint_to_bool
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output bool out0 = [ false | true | true | true | true | true | true | true | true | true ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case bool_to_float
version 300 es
values
{
input bool in0 = [ true | false ];
output float out0 = [ 1.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case bool_to_int
version 300 es
values
{
input bool in0 = [ true | false ];
output int out0 = [ 1 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case bool_to_bool
version 300 es
values
{
input bool in0 = [ true | false ];
output bool out0 = [ true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case float_to_uint
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | 0.5 | 8.25 | 20.125 | 36.8125 ];
output uint out0 = [ 0 | 1 | 2 | 3 | 0 | 8 | 20 | 36 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case int_to_uint
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | 12 | 66 | 192 | 255 ];
output uint out0 = [ 0 | 1 | 2 | 5 | 8 | 11 | 12 | 66 | 192 | 255 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case uint_to_uint
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output uint out0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case bool_to_uint
version 300 es
values
{
input bool in0 = [ true | false ];
output uint out0 = [ 1 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
end # scalar_to_scalar
group scalar_to_vector "Scalar to Vector Conversions"
case float_to_vec2
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(2.0, 2.0) | vec2(3.5, 3.5) | vec2(-0.5, -0.5) | vec2(-8.25, -8.25) | vec2(-20.125, -20.125) | vec2(36.8125, 36.8125) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec2(in0);
${OUTPUT}
}
""
end
case float_to_vec3
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(2.0, 2.0, 2.0) | vec3(3.5, 3.5, 3.5) | vec3(-0.5, -0.5, -0.5) | vec3(-8.25, -8.25, -8.25) | vec3(-20.125, -20.125, -20.125) | vec3(36.8125, 36.8125, 36.8125) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec3(in0);
${OUTPUT}
}
""
end
case float_to_vec4
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(2.0, 2.0, 2.0, 2.0) | vec4(3.5, 3.5, 3.5, 3.5) | vec4(-0.5, -0.5, -0.5, -0.5) | vec4(-8.25, -8.25, -8.25, -8.25) | vec4(-20.125, -20.125, -20.125, -20.125) | vec4(36.8125, 36.8125, 36.8125, 36.8125) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec4(in0);
${OUTPUT}
}
""
end
case float_to_ivec2
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(2, 2) | ivec2(3, 3) | ivec2(0, 0) | ivec2(-8, -8) | ivec2(-20, -20) | ivec2(36, 36) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec2(in0);
${OUTPUT}
}
""
end
case float_to_ivec3
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(2, 2, 2) | ivec3(3, 3, 3) | ivec3(0, 0, 0) | ivec3(-8, -8, -8) | ivec3(-20, -20, -20) | ivec3(36, 36, 36) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec3(in0);
${OUTPUT}
}
""
end
case float_to_ivec4
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(2, 2, 2, 2) | ivec4(3, 3, 3, 3) | ivec4(0, 0, 0, 0) | ivec4(-8, -8, -8, -8) | ivec4(-20, -20, -20, -20) | ivec4(36, 36, 36, 36) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec4(in0);
${OUTPUT}
}
""
end
case float_to_bvec2
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output bvec2 out0 = [ bvec2(false, false) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec2(in0);
${OUTPUT}
}
""
end
case float_to_bvec3
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec3(in0);
${OUTPUT}
}
""
end
case float_to_bvec4
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ];
output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec4(in0);
${OUTPUT}
}
""
end
case int_to_vec2
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(2.0, 2.0) | vec2(5.0, 5.0) | vec2(8.0, 8.0) | vec2(11.0, 11.0) | vec2(-12.0, -12.0) | vec2(-66.0, -66.0) | vec2(-192.0, -192.0) | vec2(255.0, 255.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec2(in0);
${OUTPUT}
}
""
end
case int_to_vec3
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(2.0, 2.0, 2.0) | vec3(5.0, 5.0, 5.0) | vec3(8.0, 8.0, 8.0) | vec3(11.0, 11.0, 11.0) | vec3(-12.0, -12.0, -12.0) | vec3(-66.0, -66.0, -66.0) | vec3(-192.0, -192.0, -192.0) | vec3(255.0, 255.0, 255.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec3(in0);
${OUTPUT}
}
""
end
case int_to_vec4
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(2.0, 2.0, 2.0, 2.0) | vec4(5.0, 5.0, 5.0, 5.0) | vec4(8.0, 8.0, 8.0, 8.0) | vec4(11.0, 11.0, 11.0, 11.0) | vec4(-12.0, -12.0, -12.0, -12.0) | vec4(-66.0, -66.0, -66.0, -66.0) | vec4(-192.0, -192.0, -192.0, -192.0) | vec4(255.0, 255.0, 255.0, 255.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec4(in0);
${OUTPUT}
}
""
end
case int_to_ivec2
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(2, 2) | ivec2(5, 5) | ivec2(8, 8) | ivec2(11, 11) | ivec2(-12, -12) | ivec2(-66, -66) | ivec2(-192, -192) | ivec2(255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec2(in0);
${OUTPUT}
}
""
end
case int_to_ivec3
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(2, 2, 2) | ivec3(5, 5, 5) | ivec3(8, 8, 8) | ivec3(11, 11, 11) | ivec3(-12, -12, -12) | ivec3(-66, -66, -66) | ivec3(-192, -192, -192) | ivec3(255, 255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec3(in0);
${OUTPUT}
}
""
end
case int_to_ivec4
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(2, 2, 2, 2) | ivec4(5, 5, 5, 5) | ivec4(8, 8, 8, 8) | ivec4(11, 11, 11, 11) | ivec4(-12, -12, -12, -12) | ivec4(-66, -66, -66, -66) | ivec4(-192, -192, -192, -192) | ivec4(255, 255, 255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec4(in0);
${OUTPUT}
}
""
end
case int_to_bvec2
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output bvec2 out0 = [ bvec2(false, false) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec2(in0);
${OUTPUT}
}
""
end
case int_to_bvec3
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec3(in0);
${OUTPUT}
}
""
end
case int_to_bvec4
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ];
output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec4(in0);
${OUTPUT}
}
""
end
case uint_to_vec2
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output vec2 out0 = [ vec2(0.0, 0.0) | vec2(2.0, 2.0) | vec2(3.0, 3.0) | vec2(8.0, 8.0) | vec2(9.0, 9.0) | vec2(12.0, 12.0) | vec2(10.0, 10.0) | vec2(45.0, 45.0) | vec2(193.0, 193.0) | vec2(255.0, 255.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec2(in0);
${OUTPUT}
}
""
end
case uint_to_vec3
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(2.0, 2.0, 2.0) | vec3(3.0, 3.0, 3.0) | vec3(8.0, 8.0, 8.0) | vec3(9.0, 9.0, 9.0) | vec3(12.0, 12.0, 12.0) | vec3(10.0, 10.0, 10.0) | vec3(45.0, 45.0, 45.0) | vec3(193.0, 193.0, 193.0) | vec3(255.0, 255.0, 255.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec3(in0);
${OUTPUT}
}
""
end
case uint_to_vec4
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(2.0, 2.0, 2.0, 2.0) | vec4(3.0, 3.0, 3.0, 3.0) | vec4(8.0, 8.0, 8.0, 8.0) | vec4(9.0, 9.0, 9.0, 9.0) | vec4(12.0, 12.0, 12.0, 12.0) | vec4(10.0, 10.0, 10.0, 10.0) | vec4(45.0, 45.0, 45.0, 45.0) | vec4(193.0, 193.0, 193.0, 193.0) | vec4(255.0, 255.0, 255.0, 255.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec4(in0);
${OUTPUT}
}
""
end
case uint_to_ivec2
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output ivec2 out0 = [ ivec2(0, 0) | ivec2(2, 2) | ivec2(3, 3) | ivec2(8, 8) | ivec2(9, 9) | ivec2(12, 12) | ivec2(10, 10) | ivec2(45, 45) | ivec2(193, 193) | ivec2(255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec2(in0);
${OUTPUT}
}
""
end
case uint_to_ivec3
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(2, 2, 2) | ivec3(3, 3, 3) | ivec3(8, 8, 8) | ivec3(9, 9, 9) | ivec3(12, 12, 12) | ivec3(10, 10, 10) | ivec3(45, 45, 45) | ivec3(193, 193, 193) | ivec3(255, 255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec3(in0);
${OUTPUT}
}
""
end
case uint_to_ivec4
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(2, 2, 2, 2) | ivec4(3, 3, 3, 3) | ivec4(8, 8, 8, 8) | ivec4(9, 9, 9, 9) | ivec4(12, 12, 12, 12) | ivec4(10, 10, 10, 10) | ivec4(45, 45, 45, 45) | ivec4(193, 193, 193, 193) | ivec4(255, 255, 255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec4(in0);
${OUTPUT}
}
""
end
case uint_to_bvec2
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output bvec2 out0 = [ bvec2(false, false) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec2(in0);
${OUTPUT}
}
""
end
case uint_to_bvec3
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec3(in0);
${OUTPUT}
}
""
end
case uint_to_bvec4
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec4(in0);
${OUTPUT}
}
""
end
case bool_to_vec2
version 300 es
values
{
input bool in0 = [ true | false ];
output vec2 out0 = [ vec2(1.0, 1.0) | vec2(0.0, 0.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec2(in0);
${OUTPUT}
}
""
end
case bool_to_vec3
version 300 es
values
{
input bool in0 = [ true | false ];
output vec3 out0 = [ vec3(1.0, 1.0, 1.0) | vec3(0.0, 0.0, 0.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec3(in0);
${OUTPUT}
}
""
end
case bool_to_vec4
version 300 es
values
{
input bool in0 = [ true | false ];
output vec4 out0 = [ vec4(1.0, 1.0, 1.0, 1.0) | vec4(0.0, 0.0, 0.0, 0.0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = vec4(in0);
${OUTPUT}
}
""
end
case bool_to_ivec2
version 300 es
values
{
input bool in0 = [ true | false ];
output ivec2 out0 = [ ivec2(1, 1) | ivec2(0, 0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec2(in0);
${OUTPUT}
}
""
end
case bool_to_ivec3
version 300 es
values
{
input bool in0 = [ true | false ];
output ivec3 out0 = [ ivec3(1, 1, 1) | ivec3(0, 0, 0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec3(in0);
${OUTPUT}
}
""
end
case bool_to_ivec4
version 300 es
values
{
input bool in0 = [ true | false ];
output ivec4 out0 = [ ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = ivec4(in0);
${OUTPUT}
}
""
end
case bool_to_bvec2
version 300 es
values
{
input bool in0 = [ true | false ];
output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec2(in0);
${OUTPUT}
}
""
end
case bool_to_bvec3
version 300 es
values
{
input bool in0 = [ true | false ];
output bvec3 out0 = [ bvec3(true, true, true) | bvec3(false, false, false) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec3(in0);
${OUTPUT}
}
""
end
case bool_to_bvec4
version 300 es
values
{
input bool in0 = [ true | false ];
output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(false, false, false, false) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bvec4(in0);
${OUTPUT}
}
""
end
case float_to_uvec2
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | 0.5 | 8.25 | 20.125 | 36.8125 ];
output uvec2 out0 = [ uvec2(0, 0) | uvec2(1, 1) | uvec2(2, 2) | uvec2(3, 3) | uvec2(0, 0) | uvec2(8, 8) | uvec2(20, 20) | uvec2(36, 36) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec2(in0);
${OUTPUT}
}
""
end
case float_to_uvec3
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | 0.5 | 8.25 | 20.125 | 36.8125 ];
output uvec3 out0 = [ uvec3(0, 0, 0) | uvec3(1, 1, 1) | uvec3(2, 2, 2) | uvec3(3, 3, 3) | uvec3(0, 0, 0) | uvec3(8, 8, 8) | uvec3(20, 20, 20) | uvec3(36, 36, 36) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec3(in0);
${OUTPUT}
}
""
end
case float_to_uvec4
version 300 es
values
{
input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | 0.5 | 8.25 | 20.125 | 36.8125 ];
output uvec4 out0 = [ uvec4(0, 0, 0, 0) | uvec4(1, 1, 1, 1) | uvec4(2, 2, 2, 2) | uvec4(3, 3, 3, 3) | uvec4(0, 0, 0, 0) | uvec4(8, 8, 8, 8) | uvec4(20, 20, 20, 20) | uvec4(36, 36, 36, 36) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec4(in0);
${OUTPUT}
}
""
end
case int_to_uvec2
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | 12 | 66 | 192 | 255 ];
output uvec2 out0 = [ uvec2(0, 0) | uvec2(1, 1) | uvec2(2, 2) | uvec2(5, 5) | uvec2(8, 8) | uvec2(11, 11) | uvec2(12, 12) | uvec2(66, 66) | uvec2(192, 192) | uvec2(255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec2(in0);
${OUTPUT}
}
""
end
case int_to_uvec3
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | 12 | 66 | 192 | 255 ];
output uvec3 out0 = [ uvec3(0, 0, 0) | uvec3(1, 1, 1) | uvec3(2, 2, 2) | uvec3(5, 5, 5) | uvec3(8, 8, 8) | uvec3(11, 11, 11) | uvec3(12, 12, 12) | uvec3(66, 66, 66) | uvec3(192, 192, 192) | uvec3(255, 255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec3(in0);
${OUTPUT}
}
""
end
case int_to_uvec4
version 300 es
values
{
input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | 12 | 66 | 192 | 255 ];
output uvec4 out0 = [ uvec4(0, 0, 0, 0) | uvec4(1, 1, 1, 1) | uvec4(2, 2, 2, 2) | uvec4(5, 5, 5, 5) | uvec4(8, 8, 8, 8) | uvec4(11, 11, 11, 11) | uvec4(12, 12, 12, 12) | uvec4(66, 66, 66, 66) | uvec4(192, 192, 192, 192) | uvec4(255, 255, 255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec4(in0);
${OUTPUT}
}
""
end
case uint_to_uvec2
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output uvec2 out0 = [ uvec2(0, 0) | uvec2(2, 2) | uvec2(3, 3) | uvec2(8, 8) | uvec2(9, 9) | uvec2(12, 12) | uvec2(10, 10) | uvec2(45, 45) | uvec2(193, 193) | uvec2(255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec2(in0);
${OUTPUT}
}
""
end
case uint_to_uvec3
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output uvec3 out0 = [ uvec3(0, 0, 0) | uvec3(2, 2, 2) | uvec3(3, 3, 3) | uvec3(8, 8, 8) | uvec3(9, 9, 9) | uvec3(12, 12, 12) | uvec3(10, 10, 10) | uvec3(45, 45, 45) | uvec3(193, 193, 193) | uvec3(255, 255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec3(in0);
${OUTPUT}
}
""
end
case uint_to_uvec4
version 300 es
values
{
input uint in0 = [ 0 | 2 | 3 | 8 | 9 | 12 | 10 | 45 | 193 | 255 ];
output uvec4 out0 = [ uvec4(0, 0, 0, 0) | uvec4(2, 2, 2, 2) | uvec4(3, 3, 3, 3) | uvec4(8, 8, 8, 8) | uvec4(9, 9, 9, 9) | uvec4(12, 12, 12, 12) | uvec4(10, 10, 10, 10) | uvec4(45, 45, 45, 45) | uvec4(193, 193, 193, 193) | uvec4(255, 255, 255, 255) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec4(in0);
${OUTPUT}
}
""
end
case bool_to_uvec2
version 300 es
values
{
input bool in0 = [ true | false ];
output uvec2 out0 = [ uvec2(1, 1) | uvec2(0, 0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec2(in0);
${OUTPUT}
}
""
end
case bool_to_uvec3
version 300 es
values
{
input bool in0 = [ true | false ];
output uvec3 out0 = [ uvec3(1, 1, 1) | uvec3(0, 0, 0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec3(in0);
${OUTPUT}
}
""
end
case bool_to_uvec4
version 300 es
values
{
input bool in0 = [ true | false ];
output uvec4 out0 = [ uvec4(1, 1, 1, 1) | uvec4(0, 0, 0, 0) ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uvec4(in0);
${OUTPUT}
}
""
end
end # scalar_to_vector
group vector_to_scalar "Vector to Scalar Conversions"
case vec2_to_float
version 300 es
values
{
input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ];
output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case vec2_to_int
version 300 es
values
{
input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ];
output int out0 = [ 0 | 1 | 0 | -32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case vec2_to_bool
version 300 es
values
{
input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ];
output bool out0 = [ false | true | true | true | true ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case vec3_to_float
version 300 es
values
{
input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ];
output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case vec3_to_int
version 300 es
values
{
input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ];
output int out0 = [ 0 | 1 | 0 | -32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case vec3_to_bool
version 300 es
values
{
input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ];
output bool out0 = [ false | true | true | true | true ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case vec4_to_float
version 300 es
values
{
input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ];
output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case vec4_to_int
version 300 es
values
{
input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ];
output int out0 = [ 0 | 1 | 0 | -32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case vec4_to_bool
version 300 es
values
{
input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ];
output bool out0 = [ false | true | true | true | true ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case ivec2_to_float
version 300 es
values
{
input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ];
output float out0 = [ 0.0 | 1.0 | 0.0 | -32.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case ivec2_to_int
version 300 es
values
{
input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ];
output int out0 = [ 0 | 1 | 0 | -32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case ivec2_to_bool
version 300 es
values
{
input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ];
output bool out0 = [ false | true | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case ivec3_to_float
version 300 es
values
{
input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ];
output float out0 = [ 0.0 | 1.0 | 0.0 | -32.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case ivec3_to_int
version 300 es
values
{
input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ];
output int out0 = [ 0 | 1 | 0 | -32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case ivec3_to_bool
version 300 es
values
{
input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ];
output bool out0 = [ false | true | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case ivec4_to_float
version 300 es
values
{
input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ];
output float out0 = [ 0.0 | 1.0 | 0.0 | -32.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case ivec4_to_int
version 300 es
values
{
input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ];
output int out0 = [ 0 | 1 | 0 | -32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case ivec4_to_bool
version 300 es
values
{
input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ];
output bool out0 = [ false | true | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case uvec2_to_float
version 300 es
values
{
input uvec2 in0 = [ uvec2(0, 0) | uvec2(1, 1) | uvec2(0, 2) | uvec2(32, 64) | uvec2(0, 0) ];
output float out0 = [ 0.0 | 1.0 | 0.0 | 32.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case uvec2_to_int
version 300 es
values
{
input uvec2 in0 = [ uvec2(0, 0) | uvec2(1, 1) | uvec2(0, 2) | uvec2(32, 64) | uvec2(0, 0) ];
output int out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case uvec2_to_bool
version 300 es
values
{
input uvec2 in0 = [ uvec2(0, 0) | uvec2(1, 1) | uvec2(0, 2) | uvec2(32, 64) | uvec2(0, 0) ];
output bool out0 = [ false | true | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case uvec3_to_float
version 300 es
values
{
input uvec3 in0 = [ uvec3(0, 0, 0) | uvec3(1, 1, 1) | uvec3(0, 2, 4) | uvec3(32, 64, 51) | uvec3(0, 0, 0) ];
output float out0 = [ 0.0 | 1.0 | 0.0 | 32.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case uvec3_to_int
version 300 es
values
{
input uvec3 in0 = [ uvec3(0, 0, 0) | uvec3(1, 1, 1) | uvec3(0, 2, 4) | uvec3(32, 64, 51) | uvec3(0, 0, 0) ];
output int out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case uvec3_to_bool
version 300 es
values
{
input uvec3 in0 = [ uvec3(0, 0, 0) | uvec3(1, 1, 1) | uvec3(0, 2, 4) | uvec3(32, 64, 51) | uvec3(0, 0, 0) ];
output bool out0 = [ false | true | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case uvec4_to_float
version 300 es
values
{
input uvec4 in0 = [ uvec4(0, 0, 0, 0) | uvec4(1, 1, 1, 1) | uvec4(0, 2, 4, 9) | uvec4(32, 64, 51, 24) | uvec4(0, 0, 0, 0) ];
output float out0 = [ 0.0 | 1.0 | 0.0 | 32.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case uvec4_to_int
version 300 es
values
{
input uvec4 in0 = [ uvec4(0, 0, 0, 0) | uvec4(1, 1, 1, 1) | uvec4(0, 2, 4, 9) | uvec4(32, 64, 51, 24) | uvec4(0, 0, 0, 0) ];
output int out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case uvec4_to_bool
version 300 es
values
{
input uvec4 in0 = [ uvec4(0, 0, 0, 0) | uvec4(1, 1, 1, 1) | uvec4(0, 2, 4, 9) | uvec4(32, 64, 51, 24) | uvec4(0, 0, 0, 0) ];
output bool out0 = [ false | true | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case bvec2_to_float
version 300 es
values
{
input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ];
output float out0 = [ 1.0 | 0.0 | 0.0 | 1.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case bvec2_to_int
version 300 es
values
{
input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ];
output int out0 = [ 1 | 0 | 0 | 1 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case bvec2_to_bool
version 300 es
values
{
input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ];
output bool out0 = [ true | false | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case bvec3_to_float
version 300 es
values
{
input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ];
output float out0 = [ 1.0 | 0.0 | 0.0 | 1.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case bvec3_to_int
version 300 es
values
{
input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ];
output int out0 = [ 1 | 0 | 0 | 1 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case bvec3_to_bool
version 300 es
values
{
input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ];
output bool out0 = [ true | false | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case bvec4_to_float
version 300 es
values
{
input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ];
output float out0 = [ 1.0 | 0.0 | 0.0 | 1.0 | 0.0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = float(in0);
${OUTPUT}
}
""
end
case bvec4_to_int
version 300 es
values
{
input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ];
output int out0 = [ 1 | 0 | 0 | 1 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = int(in0);
${OUTPUT}
}
""
end
case bvec4_to_bool
version 300 es
values
{
input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ];
output bool out0 = [ true | false | false | true | false ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = bool(in0);
${OUTPUT}
}
""
end
case vec2_to_uint
version 300 es
values
{
input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(0.5, 2.25) | vec2(32.0, 64.0) | vec2(0.75, 0.0322580645161) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case vec3_to_uint
version 300 es
values
{
input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(0.5, 2.25, 4.875) | vec3(32.0, 64.0, 51.0) | vec3(0.75, 0.0322580645161, 0.0526315789474) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case vec4_to_uint
version 300 es
values
{
input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(0.5, 2.25, 4.875, 9.0) | vec4(32.0, 64.0, 51.0, 24.0) | vec4(0.75, 0.0322580645161, 0.0526315789474, 0.25) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case ivec2_to_uint
version 300 es
values
{
input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, 2) | ivec2(32, 64) | ivec2(0, 0) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case ivec3_to_uint
version 300 es
values
{
input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, 2, 4) | ivec3(32, 64, 51) | ivec3(0, 0, 0) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case ivec4_to_uint
version 300 es
values
{
input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 2, 4, 9) | ivec4(32, 64, 51, 24) | ivec4(0, 0, 0, 0) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case uvec2_to_uint
version 300 es
values
{
input uvec2 in0 = [ uvec2(0, 0) | uvec2(1, 1) | uvec2(0, 2) | uvec2(32, 64) | uvec2(0, 0) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case uvec3_to_uint
version 300 es
values
{
input uvec3 in0 = [ uvec3(0, 0, 0) | uvec3(1, 1, 1) | uvec3(0, 2, 4) | uvec3(32, 64, 51) | uvec3(0, 0, 0) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case uvec4_to_uint
version 300 es
values
{
input uvec4 in0 = [ uvec4(0, 0, 0, 0) | uvec4(1, 1, 1, 1) | uvec4(0, 2, 4, 9) | uvec4(32, 64, 51, 24) | uvec4(0, 0, 0, 0) ];
output uint out0 = [ 0 | 1 | 0 | 32 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case bvec2_to_uint
version 300 es
values
{
input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ];
output uint out0 = [ 1 | 0 | 0 | 1 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case bvec3_to_uint
version 300 es
values
{
input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ];
output uint out0 = [ 1 | 0 | 0 | 1 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
case bvec4_to_uint
version 300 es
values
{
input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ];
output uint out0 = [ 1 | 0 | 0 | 1 | 0 ];
}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
out0 = uint(in0);
${OUTPUT}
}
""
end
end # vector_to_scalar
group vector_illegal "Illegal Vector Conversions"
case vec2_to_vec3
version 300 es
expect compile_fail
values {}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
vec2 in0 = vec2(0.0, 0.5);
vec3 out0 = vec3(in0);
${OUTPUT}
}
""
end
case vec2_to_ivec3
version 300 es
expect compile_fail
values {}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
vec2 in0 = vec2(0.0, 0.5);
ivec3 out0 = ivec3(in0);
${OUTPUT}
}
""
end
case vec2_to_uvec3
version 300 es
expect compile_fail
values {}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
vec2 in0 = vec2(0.0, 0.5);
uvec3 out0 = uvec3(in0);
${OUTPUT}
}
""
end
case vec2_to_bvec3
version 300 es
expect compile_fail
values {}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
vec2 in0 = vec2(0.0, 0.5);
bvec3 out0 = bvec3(in0);
${OUTPUT}
}
""
end
case vec2_to_vec4
version 300 es
expect compile_fail
values {}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
vec2 in0 = vec2(0.0, 0.5);
vec4 out0 = vec4(in0);
${OUTPUT}
}
""
end
case vec2_to_ivec4
version 300 es
expect compile_fail
values {}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
vec2 in0 = vec2(0.0, 0.5);
ivec4 out0 = ivec4(in0);
${OUTPUT}
}
""
end
case vec2_to_uvec4
version 300 es
expect compile_fail
values {}
both ""
#version 300 es
precision mediump float;
precision mediump int;
${DECLARATIONS}
void main()
{
${SETUP}
vec2 in0 = vec2(0.0, 0.5);
uvec4 out0 = uvec4(in0);
${OUTPUT}
}
""
end
case vec2_to_bvec4
version 300 es
expect compile_fail
values {}
both ""