File: web.builtins.frag

package info (click to toggle)
glslang 16.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,712 kB
  • sloc: cpp: 92,305; yacc: 4,320; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (58 lines) | stat: -rw-r--r-- 1,474 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#version 310 es

precision lowp float;
layout(location = 4) in float c1D;
layout(location = 5) in vec2  c2D;
layout(location = 6) in vec3  c3D;
layout(location = 7) in smooth vec4  c4D;

layout(location = 1) flat in int   ic1D;
layout(location = 2) flat in ivec3 ic3D;
layout(location = 3) flat in ivec4 ic4D;

const ivec2 ic2D = ivec2(2, 3);

struct s {
    int i;
    sampler2D s;
};

struct S2 {
    vec3 c;
    float f;
};

layout(location = 8) in S2 s2;

layout(location = 0) out vec3 sc;
layout(location = 1) out float sf;

void main()
{
    float f = gl_FragCoord.y;
    gl_FragDepth = f;

    sc = s2.c;
    sf = s2.f;

    sinh(c1D) +
    cosh(c1D) * tanh(c2D);
    asinh(c4D) + acosh(c4D);
    atanh(c3D);
}

void foo324(void)
{
    float p = pow(3.2, 4.6);
    p += sin(0.4);
    p += distance(vec2(10.0, 11.0), vec2(13.0, 15.0)); // 5
    p += dot(vec3(2,3,5), vec3(-2,-1,4));              // 13
    vec3 c3 = cross(vec3(3,-3,1), vec3(4,9,2));        // (-15, -2, 39)
    c3 += faceforward(vec3(1,2,3), vec3(2,3,5), vec3(-2,-1,4));     // (-1,-2,-3)
    c3 += faceforward(vec3(1,2,3), vec3(-2,-3,-5), vec3(-2,-1,4));  // (1,2,3)
    vec2 c2 = reflect(vec2(1,3), vec2(0,1));           // (1,-3)
    c2 += refract(vec2(1,3), vec2(0,1), 1.0);          // (1,-3)
    c2 += refract(vec2(1,3), vec2(0,1), 3.0);
    c2 += refract(vec2(1,0.1), vec2(0,1), 5.0);        // (0,0)
    mat3x2 m32 = outerProduct(vec2(2,3), vec3(5,7,11));// rows: (10, 14, 22), (15, 21, 33)
}