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 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user