• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 450
2
3in float  inf;
4in flat ivec4  ini4;
5out vec4  outf4;
6
7float Test1(int bound)
8{
9    float r = 0;
10    for (int x=0; x<bound; ++x)
11        r += 0.5;
12    return r;
13}
14
15float Test2(int bound)
16{
17    if (bound > 2)
18        return Test1(bound);
19    else
20        return float(bound * 2 +
21                     ini4.y * ini4.z +
22                     ini4.x);
23}
24
25void main()
26{
27    outf4 = vec4(Test1(int(inf)) +
28                 Test2(int(inf)));
29}
30