File: cube.glsl

package info (click to toggle)
libsdl3 3.2.10%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 42,240 kB
  • sloc: ansic: 389,254; objc: 12,241; xml: 9,084; cpp: 5,728; perl: 4,547; python: 3,370; sh: 947; makefile: 265; cs: 56
file content (31 lines) | stat: -rw-r--r-- 481 bytes parent folder | download
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
#version 450

#ifdef VERTEX

layout (location = 0) in vec3 in_position;
layout (location = 1) in vec3 in_color;

layout (location = 0) out vec4 out_color;

layout (set = 1, binding = 0) uniform UBO
{
    mat4x4 modelViewProj;
};

void main()
{
    out_color = vec4(in_color, 1.0);
    gl_Position = modelViewProj * vec4(in_position, 1.0);
}

#else

layout (location = 0) in vec4 in_color;
layout (location = 0) out vec4 out_color;

void main()
{
    out_color = in_color;
}

#endif