mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
Remove some more automatic sRGB image flags.
This commit is contained in:
parent
71632ea291
commit
9eef320c91
2 changed files with 14 additions and 6 deletions
|
@ -705,7 +705,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
|
|||
}
|
||||
num = stage->bundle[0].numImageAnimations;
|
||||
if ( num < MAX_IMAGE_ANIMATIONS ) {
|
||||
imgFlags_t flags = IMGFLAG_SRGB;
|
||||
imgFlags_t flags = IMGFLAG_NONE;
|
||||
|
||||
if (!shader.noMipMaps)
|
||||
flags |= IMGFLAG_MIPMAP;
|
||||
|
@ -1245,6 +1245,7 @@ static void ParseSkyParms( char **text ) {
|
|||
static char *suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"};
|
||||
char pathname[MAX_QPATH];
|
||||
int i;
|
||||
imgFlags_t imgFlags = IMGFLAG_MIPMAP | IMGFLAG_PICMIP;
|
||||
|
||||
// outerbox
|
||||
token = COM_ParseExt( text, qfalse );
|
||||
|
@ -1256,7 +1257,7 @@ static void ParseSkyParms( char **text ) {
|
|||
for (i=0 ; i<6 ; i++) {
|
||||
Com_sprintf( pathname, sizeof(pathname), "%s_%s.tga"
|
||||
, token, suf[i] );
|
||||
shader.sky.outerbox[i] = R_FindImageFile( ( char * ) pathname, IMGTYPE_COLORALPHA, IMGFLAG_SRGB | IMGFLAG_MIPMAP | IMGFLAG_PICMIP | IMGFLAG_CLAMPTOEDGE );
|
||||
shader.sky.outerbox[i] = R_FindImageFile( ( char * ) pathname, IMGTYPE_COLORALPHA, imgFlags | IMGFLAG_CLAMPTOEDGE );
|
||||
|
||||
if ( !shader.sky.outerbox[i] ) {
|
||||
shader.sky.outerbox[i] = tr.defaultImage;
|
||||
|
@ -1287,7 +1288,7 @@ static void ParseSkyParms( char **text ) {
|
|||
for (i=0 ; i<6 ; i++) {
|
||||
Com_sprintf( pathname, sizeof(pathname), "%s_%s.tga"
|
||||
, token, suf[i] );
|
||||
shader.sky.innerbox[i] = R_FindImageFile( ( char * ) pathname, IMGTYPE_COLORALPHA, IMGFLAG_SRGB | IMGFLAG_MIPMAP | IMGFLAG_PICMIP );
|
||||
shader.sky.innerbox[i] = R_FindImageFile( ( char * ) pathname, IMGTYPE_COLORALPHA, imgFlags );
|
||||
if ( !shader.sky.innerbox[i] ) {
|
||||
shader.sky.innerbox[i] = tr.defaultImage;
|
||||
}
|
||||
|
|
|
@ -756,7 +756,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
|
|||
}
|
||||
num = stage->bundle[0].numImageAnimations;
|
||||
if ( num < MAX_IMAGE_ANIMATIONS ) {
|
||||
imgFlags_t flags = IMGFLAG_SRGB;
|
||||
imgFlags_t flags = IMGFLAG_NONE;
|
||||
|
||||
if (!shader.noMipMaps)
|
||||
flags |= IMGFLAG_MIPMAP;
|
||||
|
@ -764,6 +764,9 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
|
|||
if (!shader.noPicMip)
|
||||
flags |= IMGFLAG_PICMIP;
|
||||
|
||||
if (r_srgb->integer)
|
||||
flags |= IMGFLAG_SRGB;
|
||||
|
||||
stage->bundle[0].image[num] = R_FindImageFile( token, IMGTYPE_COLORALPHA, flags );
|
||||
if ( !stage->bundle[0].image[num] )
|
||||
{
|
||||
|
@ -1376,6 +1379,10 @@ static void ParseSkyParms( char **text ) {
|
|||
static char *suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"};
|
||||
char pathname[MAX_QPATH];
|
||||
int i;
|
||||
imgFlags_t imgFlags = IMGFLAG_MIPMAP | IMGFLAG_PICMIP;
|
||||
|
||||
if (r_srgb->integer)
|
||||
imgFlags |= IMGFLAG_SRGB;
|
||||
|
||||
// outerbox
|
||||
token = COM_ParseExt( text, qfalse );
|
||||
|
@ -1387,7 +1394,7 @@ static void ParseSkyParms( char **text ) {
|
|||
for (i=0 ; i<6 ; i++) {
|
||||
Com_sprintf( pathname, sizeof(pathname), "%s_%s.tga"
|
||||
, token, suf[i] );
|
||||
shader.sky.outerbox[i] = R_FindImageFile( ( char * ) pathname, IMGTYPE_COLORALPHA, IMGFLAG_SRGB | IMGFLAG_MIPMAP | IMGFLAG_PICMIP | IMGFLAG_CLAMPTOEDGE );
|
||||
shader.sky.outerbox[i] = R_FindImageFile( ( char * ) pathname, IMGTYPE_COLORALPHA, imgFlags | IMGFLAG_CLAMPTOEDGE );
|
||||
|
||||
if ( !shader.sky.outerbox[i] ) {
|
||||
shader.sky.outerbox[i] = tr.defaultImage;
|
||||
|
@ -1418,7 +1425,7 @@ static void ParseSkyParms( char **text ) {
|
|||
for (i=0 ; i<6 ; i++) {
|
||||
Com_sprintf( pathname, sizeof(pathname), "%s_%s.tga"
|
||||
, token, suf[i] );
|
||||
shader.sky.innerbox[i] = R_FindImageFile( ( char * ) pathname, IMGTYPE_COLORALPHA, IMGFLAG_SRGB | IMGFLAG_MIPMAP | IMGFLAG_PICMIP );
|
||||
shader.sky.innerbox[i] = R_FindImageFile( ( char * ) pathname, IMGTYPE_COLORALPHA, imgFlags );
|
||||
if ( !shader.sky.innerbox[i] ) {
|
||||
shader.sky.innerbox[i] = tr.defaultImage;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue