xref: /third_party/glslang/Test/spv.uniformInitializerStruct.frag
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/glslang/Test/
1617a3babSopenharmony_ci#version 450
2617a3babSopenharmony_ci
3617a3babSopenharmony_cilayout (location = 0) out vec4 color;
4617a3babSopenharmony_ci
5617a3babSopenharmony_cilayout (location = 0) uniform struct {
6617a3babSopenharmony_ci        float r;
7617a3babSopenharmony_ci        float g;
8617a3babSopenharmony_ci        float b;
9617a3babSopenharmony_ci} parts[2] = { { 1.0, 1.0, 1.0}, { 0.0, 1.0, 0.0 } };
10617a3babSopenharmony_ci
11617a3babSopenharmony_civoid main() {
12617a3babSopenharmony_ci  color = vec4(0.0, 0.0, 0.0, 1.0);
13617a3babSopenharmony_ci
14617a3babSopenharmony_ci  for (int i = 0; i < 2; i++) {
15617a3babSopenharmony_ci    color.r += parts[i].r;
16617a3babSopenharmony_ci    color.g += parts[i].g;
17617a3babSopenharmony_ci    color.b += parts[i].b;
18617a3babSopenharmony_ci  }
19617a3babSopenharmony_ci}
20

Indexes created Thu Nov 07 10:32:03 CST 2024