- ra3.client::display: shared interactive loops; SDL and Vulkan backends implement only the primitives (init/present/poll_event/window_size/ key_down/present_terrain). ra3.display picks the backend. - Menu: maps by localized name (gamestrings.csf), red/gold theme, hover highlight, mouse + keyboard, wheel scroll, fullscreen and FPS/vsync options, loading progress bar. - Terrain: continuous tile sampling via a texture array (REPEAT, uv = cell/(2*cellSize)) removes per-cell grid seams; SAGE blend ramp for material transitions; FPS label + top-right minimap overlays. - Skip the skirmish sim for map views; reuse the Vulkan texture; no idle terrain redraw.
19 lines
712 B
GLSL
19 lines
712 B
GLSL
#version 450
|
|
|
|
// Fullscreen triangle. The scene image is drawn as a single textured quad; the
|
|
// push constant carries the destination rectangle (in window-normalized
|
|
// coordinates, y down), so the map is letterboxed rather than stretched.
|
|
layout(push_constant) uniform Push {
|
|
vec4 rect; // xy = top-left (0..1), zw = size (0..1)
|
|
} pc;
|
|
|
|
layout(location = 0) out vec2 out_uv;
|
|
|
|
void main() {
|
|
// Vulkan clip space has +Y pointing DOWN, so p already runs top->bottom and
|
|
// matches the image's top-left origin; do NOT flip it (OpenGL would).
|
|
vec2 p = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
|
out_uv = (p - pc.rect.xy) / pc.rect.zw;
|
|
gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0);
|
|
}
|