mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 08:27:39 +00:00
c7b2843c0e
The fragment shader is a bit of a mini mega-shader, but I do want to try out specializations.
28 lines
547 B
GLSL
28 lines
547 B
GLSL
#version 450
|
|
|
|
layout (set = 0, binding = 0) uniform Matrices {
|
|
mat4 Projection;
|
|
mat4 View;
|
|
mat4 Sky;
|
|
};
|
|
|
|
layout (push_constant) uniform PushConstants {
|
|
mat4 Model;
|
|
};
|
|
|
|
layout (location = 0) in vec4 vertex;
|
|
layout (location = 1) in vec4 tl_uv;
|
|
layout (location = 2) in vec4 vcolor;
|
|
|
|
layout (location = 0) out vec4 tl_st;
|
|
layout (location = 1) out vec4 color;
|
|
layout (location = 2) out vec3 direction;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
gl_Position = Projection * (View * (Model * vertex));
|
|
direction = (Sky * vertex).xyz;
|
|
tl_st = tl_uv;
|
|
color = vcolor;
|
|
}
|