From 4bfb0e937f282fb6e18c705d9bf29b8928cbf16c Mon Sep 17 00:00:00 2001 From: dondiego Date: Wed, 1 Apr 2020 01:17:41 +0200 Subject: [PATCH] - Fixed tutti-frutti and crash with liquid warp effects on the Carmack renderer when texture resizing was disabled. (#1063) --- src/rendering/swrenderer/textures/warptexture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rendering/swrenderer/textures/warptexture.cpp b/src/rendering/swrenderer/textures/warptexture.cpp index afc48bc4a..23a15529a 100644 --- a/src/rendering/swrenderer/textures/warptexture.cpp +++ b/src/rendering/swrenderer/textures/warptexture.cpp @@ -42,6 +42,7 @@ EXTERN_CVAR(Int, gl_texture_hqresizemult) EXTERN_CVAR(Int, gl_texture_hqresizemode) +EXTERN_CVAR(Int, gl_texture_hqresize_targets) FWarpTexture::FWarpTexture (FTexture *source, int warptype) : FSoftwareTexture (source) @@ -63,7 +64,7 @@ const uint32_t *FWarpTexture::GetPixelsBgra() if (time != GenTime[2]) { - if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1) + if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1 || !(gl_texture_hqresize_targets & 1)) resizeMult = 1; auto otherpix = FSoftwareTexture::GetPixelsBgra(); @@ -84,7 +85,7 @@ const uint8_t *FWarpTexture::GetPixels(int index) if (time != GenTime[index]) { - if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1) + if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1 || !(gl_texture_hqresize_targets & 1)) resizeMult = 1; const uint8_t *otherpix = FSoftwareTexture::GetPixels(index);