From 122fbcc8083ff38dc6e407de64ecab79bdcdc48a Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 21 Mar 2026 22:15:46 +0100 Subject: [PATCH] fix gr_skydome 0 ugh... --- src/hardware/hw_main.c | 3 +++ src/hardware/hw_sky.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index b85400568..2493fd711 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -794,6 +794,9 @@ static void HWR_RenderViewpoint(player_t *player, boolean drawSkyTexture, boolea gl_portal_array_t *portal_array; HWR_PrepareTransform(player, is_skybox); + // we need to set our transformations now so portal clipping + // has the projectionmatrix set up with our actual view + // since our clipper uses this to determine our actual visible geometry GL_SetTransform(&atransform); HWR_ClearSprites(); HWR_ResetClipper(); diff --git a/src/hardware/hw_sky.c b/src/hardware/hw_sky.c index 47b8c9692..0e5ca83ca 100644 --- a/src/hardware/hw_sky.c +++ b/src/hardware/hw_sky.c @@ -222,6 +222,7 @@ void HWR_DrawSkyBackground(player_t *player) float angleturn; HWR_GetTexture(texturetranslation[skytexture], false); + aspectratio = (float)vid.width/(float)vid.height; //Hurdler: the sky is the only texture who need 4.0f instead of 1.0 @@ -293,6 +294,8 @@ void HWR_DrawSkyBackground(player_t *player) v[0].t = v[1].t -= ((float) angle / angleturn); } + // since sky is drawn as a "flat quad" this way, we have to unset any view transformations for it to work + GL_SetTransform(NULL); GL_UnSetShader(); GL_DrawPolygon(NULL, v, 4, 0); }