Skip to content

Commit

Permalink
HACK the HACK
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed May 13, 2024
1 parent 411690c commit efc6463
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/engine/renderer/tr_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6367,21 +6367,24 @@ shader_t *R_FindShader( const char *name, shaderType_t type,
Log::Debug( "loading '%s' image as shader", fileName );

// choosing filter based on the NOMIP flag seems strange,
// maybe it should be changed to type == SHADER_2D
if( !(bits & RSF_NOMIP) ) {
LoadExtraMaps( &stages[ 0 ], fileName );

// we better introduce RSF_2D.
if( ( bits & RSF_NOMIP ) || ( bits & RSF_FITSCREEN ) )
{
imageParams_t imageParams = {};
imageParams.bits = bits;
imageParams.filterType = filterType_t::FT_DEFAULT;
imageParams.wrapType = wrapTypeEnum_t::WT_REPEAT;
imageParams.filterType = filterType_t::FT_LINEAR;
imageParams.wrapType = wrapTypeEnum_t::WT_CLAMP;

image = R_FindImageFile( fileName, imageParams );
} else {
}
else
{
LoadExtraMaps( &stages[ 0 ], fileName );

imageParams_t imageParams = {};
imageParams.bits = bits;
imageParams.filterType = filterType_t::FT_LINEAR;
imageParams.wrapType = wrapTypeEnum_t::WT_CLAMP;
imageParams.filterType = filterType_t::FT_DEFAULT;
imageParams.wrapType = wrapTypeEnum_t::WT_REPEAT;

image = R_FindImageFile( fileName, imageParams );
}
Expand Down

0 comments on commit efc6463

Please sign in to comment.