mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
f477f2b96e
Line rendering now has its own pipeline (removing the texture issue). Glyph rendering (for fonts) has been reworked to use instanced quad rendering, with the geometry (position and texture coords) in a static buffer (uniform texture buffer), and each instance has a glyph index, color, and 2d base position. Multiple fonts can be loaded, but aren't used yet: still just the one (work needs to be done on the queues to support multiple textures/fonts). Quads haven't changed much, but buffer creation and destruction has been cleaned up to use the resource functions.
20 lines
375 B
GLSL
20 lines
375 B
GLSL
#version 450
|
|
|
|
layout (set = 0, binding = 0) uniform Matrices {
|
|
mat4 Projection3d;
|
|
mat4 View;
|
|
mat4 Sky;
|
|
mat4 Projection2d;
|
|
};
|
|
layout (location = 0) in vec2 vertex;
|
|
layout (location = 1) in vec2 uv;
|
|
layout (location = 2) in vec4 vcolor;
|
|
|
|
layout (location = 0) out vec4 color;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
gl_Position = Projection2d * vec4 (vertex.xy, 0.0, 1.0);
|
|
color = vcolor;
|
|
}
|