• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 460
2
3
4layout(location = 5) in outBlock {
5    vec4 o3;
6};
7
8
9in vec4 gfo1;
10in vec2 gfo2;
11
12out vec4 outColor;
13
14uniform vec2 u1;
15uniform vec3 u2;           // initializer present in vertex stage
16uniform vec4 u3 = vec4(0); // initializer matches initializer in vertex stage
17
18uniform mat2 um2 = mat2(4.0);
19
20layout (location = 0, binding = 0) uniform sampler2D glass;
21
22uniform crossStageBlock1 {
23    uniform vec4 a;
24    vec4 b;
25};
26
27buffer fragOnlyBlock {
28    vec2 fb1;
29};
30
31uniform crossStageBlock2 {
32    uniform vec4 a;
33    vec2 b;
34} blockName2 [2]; // instance name different from vert
35
36
37void main()
38{
39    vec4 color = gfo1 * u1.rgrg * u2.rgbr * u3.rgba;        // o1 is statically used
40    outColor = color;
41}
42
43