File: spv.uniformInitializerStruct.frag

package info (click to toggle)
glslang 16.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 51,712 kB
  • sloc: cpp: 92,305; yacc: 4,320; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (19 lines) | stat: -rw-r--r-- 368 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#version 450

layout (location = 0) out vec4 color;

layout (location = 0) uniform struct {
        float r;
        float g;
        float b;
} parts[2] = { { 1.0, 1.0, 1.0}, { 0.0, 1.0, 0.0 } };

void main() {
  color = vec4(0.0, 0.0, 0.0, 1.0);

  for (int i = 0; i < 2; i++) {
    color.r += parts[i].r;
    color.g += parts[i].g;
    color.b += parts[i].b;
  }
}