1#version 310 es 2 3precision lowp float; 4layout(location = 4) in float c1D; 5layout(location = 5) in vec2 c2D; 6layout(location = 6) in vec3 c3D; 7layout(location = 7) in smooth vec4 c4D; 8 9layout(location = 1) flat in int ic1D; 10layout(location = 2) flat in ivec3 ic3D; 11layout(location = 3) flat in ivec4 ic4D; 12 13const ivec2 ic2D = ivec2(2, 3); 14 15struct s { 16 int i; 17 sampler2D s; 18}; 19 20struct S2 { 21 vec3 c; 22 float f; 23}; 24 25layout(location = 8) in S2 s2; 26 27layout(location = 0) out vec3 sc; 28layout(location = 1) out float sf; 29 30void main() 31{ 32 float f = gl_FragCoord.y; 33 gl_FragDepth = f; 34 35 sc = s2.c; 36 sf = s2.f; 37 38 sinh(c1D) + 39 cosh(c1D) * tanh(c2D); 40 asinh(c4D) + acosh(c4D); 41 atanh(c3D); 42} 43 44void foo324(void) 45{ 46 float p = pow(3.2, 4.6); 47 p += sin(0.4); 48 p += distance(vec2(10.0, 11.0), vec2(13.0, 15.0)); // 5 49 p += dot(vec3(2,3,5), vec3(-2,-1,4)); // 13 50 vec3 c3 = cross(vec3(3,-3,1), vec3(4,9,2)); // (-15, -2, 39) 51 c3 += faceforward(vec3(1,2,3), vec3(2,3,5), vec3(-2,-1,4)); // (-1,-2,-3) 52 c3 += faceforward(vec3(1,2,3), vec3(-2,-3,-5), vec3(-2,-1,4)); // (1,2,3) 53 vec2 c2 = reflect(vec2(1,3), vec2(0,1)); // (1,-3) 54 c2 += refract(vec2(1,3), vec2(0,1), 1.0); // (1,-3) 55 c2 += refract(vec2(1,3), vec2(0,1), 3.0); 56 c2 += refract(vec2(1,0.1), vec2(0,1), 5.0); // (0,0) 57 mat3x2 m32 = outerProduct(vec2(2,3), vec3(5,7,11));// rows: (10, 14, 22), (15, 21, 33) 58} 59