first build attempt

This commit is contained in:
2026-04-23 08:05:03 -07:00
parent a75186cab6
commit f68524a6ae
125 changed files with 23271 additions and 463 deletions

26
shaders/graticule.vert Normal file
View File

@@ -0,0 +1,26 @@
/*
* MIT License
* Author: Mark Allyn
*
* graticule.vert — vertex shader for the incandescent bearing graticule,
* the yellow cursor, and any other 2-D screen-space line geometry.
*
* Vertices are supplied in window pixels (origin top-left, y down).
* The shader converts them to OpenGL NDC (origin bottom-left, y up).
*/
#version 330 core
layout(location = 0) in vec2 aPos; // screen pixels, top-left origin
uniform vec2 u_viewportSize; // (WINDOW_WIDTH, WINDOW_HEIGHT)
void main() {
// Convert: pixel → NDC
// ndc.x: 0 → -1, width → +1
// ndc.y: 0 → +1 (top), height → -1 (bottom)
vec2 ndc = vec2(
aPos.x / u_viewportSize.x * 2.0 - 1.0,
-aPos.y / u_viewportSize.y * 2.0 + 1.0
);
gl_Position = vec4(ndc, 0.0, 1.0);
}