From 7ae11f174c8afc400a77272fb01760fefc3f1045 Mon Sep 17 00:00:00 2001 From: Cyd Date: Wed, 8 Jul 2026 19:37:29 -0500 Subject: [PATCH] HUD: dpl2d Y grows down -- unflip the whole 2D layer Period VHS footage of a 4.10 game (operator's capture) shows the twist dial UNDER the reticle and the range bar filling top-to-bottom; our mapping of dpl2d Y straight onto GL's Y-up NDC (and the software path's "y up" projection) rendered the entire HUD vertically flipped. Co-Authored-By: Claude Fable 5 --- dpl3-revive/patha/vrview.py | 4 +++- dpl3-revive/patha/vrview_gl.py | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dpl3-revive/patha/vrview.py b/dpl3-revive/patha/vrview.py index 42d4655..63950fd 100644 --- a/dpl3-revive/patha/vrview.py +++ b/dpl3-revive/patha/vrview.py @@ -1008,8 +1008,10 @@ class Renderer: g = 1.0 / self.gamma def P(pt): + # dpl2d Y grows DOWN (screen convention; period VHS footage: + # twist dial UNDER the reticle, range bar filling top-to-bottom) return (int((pt[0] - x0) * sx + 0.5), - int((y1 - pt[1]) * sy + 0.5)) # y up + int((pt[1] - y0) * sy + 0.5)) try: prims = hud2d_prims(board.dl2d, root) diff --git a/dpl3-revive/patha/vrview_gl.py b/dpl3-revive/patha/vrview_gl.py index 29a7e07..ebde7ce 100644 --- a/dpl3-revive/patha/vrview_gl.py +++ b/dpl3-revive/patha/vrview_gl.py @@ -196,6 +196,10 @@ in vec2 in_pos; void main() { vec2 p = vec2((in_pos.x - u_rect.x) / (u_rect.z - u_rect.x), (in_pos.y - u_rect.y) / (u_rect.w - u_rect.y)) * 2.0 - 1.0; + // dpl2d Y grows DOWN (screen convention): period VHS footage shows the + // twist dial UNDER the reticle and the range bar filling top-to-bottom; + // mapping straight onto GL's Y-up NDC rendered the whole HUD flipped. + p.y = -p.y; gl_Position = vec4(p, 0.0, 1.0); } """