From efc6463fbd285c6f0336e4a3aae505fdc7fd9863 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Mon, 13 May 2024 15:15:27 +0200 Subject: [PATCH] HACK the HACK --- src/engine/renderer/tr_shader.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/engine/renderer/tr_shader.cpp b/src/engine/renderer/tr_shader.cpp index 38e357f8ad..e187c16deb 100644 --- a/src/engine/renderer/tr_shader.cpp +++ b/src/engine/renderer/tr_shader.cpp @@ -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 ); }