* s/GL_CLAMP/GL_CLAMP_TO_EDGE/g (If this change appears to cause you problems

and you're using an nVidia graphics card, make sure your 'conformant texture
  clamp' setting is set to on for ioq3)
This commit is contained in:
Tim Angus 2008-08-12 19:34:43 +00:00
parent 7edcc7d16a
commit f2baf359ae
6 changed files with 14 additions and 17 deletions

View file

@ -657,7 +657,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
return qfalse;
}
stage->bundle[0].image[0] = R_FindImageFile( token, !shader.noMipMaps, !shader.noPicMip, GL_CLAMP );
stage->bundle[0].image[0] = R_FindImageFile( token, !shader.noMipMaps, !shader.noPicMip, GL_CLAMP_TO_EDGE );
if ( !stage->bundle[0].image[0] )
{
ri.Printf( PRINT_WARNING, "WARNING: R_FindImageFile could not find '%s' in shader '%s'\n", token, shader.name );
@ -1230,11 +1230,8 @@ static void ParseSkyParms( char **text ) {
for (i=0 ; i<6 ; i++) {
Com_sprintf( pathname, sizeof(pathname), "%s_%s.tga"
, token, suf[i] );
#ifdef GL_CLAMP_TO_EDGE
shader.sky.outerbox[i] = R_FindImageFile( ( char * ) pathname, qtrue, qtrue, GL_CLAMP_TO_EDGE );
#else
shader.sky.outerbox[i] = R_FindImageFile( ( char * ) pathname, qtrue, qtrue, GL_CLAMP );
#endif
if ( !shader.sky.outerbox[i] ) {
shader.sky.outerbox[i] = tr.defaultImage;
}
@ -2516,7 +2513,7 @@ shader_t *R_FindShader( const char *name, int lightmapIndex, qboolean mipRawImag
// if not defined in the in-memory shader descriptions,
// look for a single supported image file
//
image = R_FindImageFile( name, mipRawImage, mipRawImage, mipRawImage ? GL_REPEAT : GL_CLAMP );
image = R_FindImageFile( name, mipRawImage, mipRawImage, mipRawImage ? GL_REPEAT : GL_CLAMP_TO_EDGE );
if ( !image ) {
ri.Printf( PRINT_DEVELOPER, "Couldn't find image file for shader %s\n", name );
shader.defaultShader = qtrue;