ioquake / ioq3

The ioquake3 community effort to continue supporting/developing id's Quake III Arena
https://ioquake3.org/
GNU General Public License v2.0
2.43k stars 530 forks source link

opengl1: Skybox in OpenGL 1.1 displays black lines at edges #656

Closed zturtleman closed 7 months ago

zturtleman commented 7 months ago

shot0013 _opengl1 displaying Team Arena mpteam3 without GL_CLAMP_TOEDGE. There is a thin black Y to the left of the crosshair, this is the corner of the sky box.

Without the extension for GL_CLAMP_TO_EDGE (added in OpenGL 1.2) there is a black border visible on sky boxes. This can be resolved by changing the texcoords so that the S range is "0.5 / texture_width" to "1.0 - ( 0.5 / texture_width )" (and T using texture_height) instead of 0.0 to 1.0 so the border for GL_CLAMP is not visible.

The sky sides are split into quads and only visible parts are drawn. It's not quite as easy as just changing the texcoord values (s0, t0, s1, t1) when drawing the side.