From 5a918bfa9665e51e11e74c252be1269f68b14bbe Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 17 Apr 2024 22:41:07 -0500 Subject: [PATCH 1/2] opengl1: Fix skybox in OpenGL 1.1 Fix six image skybox having a black border around the sides of the sky when using OpenGL 1.1 (using CL_CLAMP instead of GL_CLAMP_TO_EDGE). It's technically visible in q3dm10 but it's more obvious in Team Arena maps such as mpteam6. --- code/renderergl1/tr_sky.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/code/renderergl1/tr_sky.c b/code/renderergl1/tr_sky.c index 1d12e924e..2f5f7786f 100644 --- a/code/renderergl1/tr_sky.c +++ b/code/renderergl1/tr_sky.c @@ -387,12 +387,17 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max static void DrawSkyBox( shader_t *shader ) { int i; + float w_offset, w_scale; + float h_offset, h_scale; sky_min = 0; sky_max = 1; Com_Memset( s_skyTexCoords, 0, sizeof( s_skyTexCoords ) ); + w_offset = h_offset = 0; + w_scale = h_scale = 1; + for (i=0 ; i<6 ; i++) { int sky_mins_subd[2], sky_maxs_subd[2]; @@ -432,6 +437,15 @@ static void DrawSkyBox( shader_t *shader ) else if ( sky_maxs_subd[1] > HALF_SKY_SUBDIVISIONS ) sky_maxs_subd[1] = HALF_SKY_SUBDIVISIONS; + if ( !haveClampToEdge ) + { + w_offset = 0.5f / shader->sky.outerbox[sky_texorder[i]]->width; + h_offset = 0.5f / shader->sky.outerbox[sky_texorder[i]]->height; + + w_scale = 1.0f - w_offset * 2; + h_scale = 1.0f - h_offset * 2; + } + // // iterate through the subdivisions // @@ -444,6 +458,12 @@ static void DrawSkyBox( shader_t *shader ) i, s_skyTexCoords[t][s], s_skyPoints[t][s] ); + + s_skyTexCoords[t][s][0] *= w_scale; + s_skyTexCoords[t][s][0] += w_offset; + + s_skyTexCoords[t][s][1] *= h_scale; + s_skyTexCoords[t][s][1] += h_offset; } } From 60dfabbeb7a50cd55b214194eb2ec64c39529b59 Mon Sep 17 00:00:00 2001 From: Jack Slater Date: Thu, 18 Apr 2024 08:45:56 -1000 Subject: [PATCH 2/2] Update SECURITY.md --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 8732e8b16..fd5c9f37f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ We take security very seriously at ioquake3. We welcome any peer review of our 1 ### Where should I report security issues? In order to give the community time to respond and upgrade we strongly urge you report all security issues privately. -Please e-mail zachary@ioquake.org directly to provide details and repro steps and we will respond as soon as possible, but please note: +Please e-mail jack@ioquake.org directly to provide details and repro steps and we will respond as soon as possible, but please note: ### This is an entirely free software project without much in the way of external funding or sponsorships. ### We cannot guarantee quick responses but we very much appreciate your discretion when reporting security vulnerabilities.