File: link.crossStageOptimization.vert

package info (click to toggle)
glslang 16.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,720 kB
  • sloc: cpp: 92,305; yacc: 4,320; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (41 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (5)
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
#version 440

layout(std140) uniform AccessedUniformBlock
{
    vec4 a;
    vec4 b;
};

layout(std140) uniform NotAccessedUniformBlock
{
    vec4 c;
    vec4 d;
};

layout(std430) buffer AccessedStorageBlock
{
    float e[512];
};

layout(std430) buffer NotAccessedStorageBlock
{
    float f[512];
};

uniform sampler2D uSampler0; // accessed
uniform sampler2D uSampler1; // not accessed

layout(location = 0) out vec4 a0; // accessed
layout(location = 1) out vec4 a1; // not accessed
layout(location = 2) out vec4 a2; // accessed
layout(location = 3) out vec4 a3; // not accessed

void main()
{
    a0 = a + vec4(e[0]) + texture(uSampler0, vec2(0.5, 0.5));
    a1 = c + vec4(f[1]) + texture(uSampler1, vec2(0.5, 0.5));
    a2 = b + vec4(e[0]) + texture(uSampler0, vec2(0.5, 0.5));
    a3 = d + vec4(f[1]) + texture(uSampler1, vec2(0.5, 0.5));

    gl_Position = vec4(1.0, 1.0, 1.0, 1.0);
}