From 4fa614d35bb5bd8242cc79b5b100b12f4e501391 Mon Sep 17 00:00:00 2001 From: Ivan 'provod' Avdeev Date: Mon, 9 Oct 2023 19:49:54 -0400 Subject: [PATCH] vk: rt: do not use fast srgb-linear conversion FAST mode is incorrect for low values and leads to visible rendering artifacts. --- ref/vk/shaders/color_spaces.glsl | 2 -- ref/vk/vk_textures.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ref/vk/shaders/color_spaces.glsl b/ref/vk/shaders/color_spaces.glsl index 72547ff9..23f201f2 100644 --- a/ref/vk/shaders/color_spaces.glsl +++ b/ref/vk/shaders/color_spaces.glsl @@ -1,5 +1,3 @@ -#define SRGB_FAST_APPROXIMATION - #ifdef SRGB_FAST_APPROXIMATION #define LINEARtoSRGB OECF_sRGBFast #define SRGBtoLINEAR sRGB_OECFFast diff --git a/ref/vk/vk_textures.c b/ref/vk/vk_textures.c index 0ec85da3..a76082f4 100644 --- a/ref/vk/vk_textures.c +++ b/ref/vk/vk_textures.c @@ -594,7 +594,7 @@ static qboolean uploadTexture(vk_texture_t *tex, rgbdata_t *const *const layers, tex->height = layers[0]->height; mipCount = CalcMipmapCount( tex, true); - DEBUG("Uploading texture %s, mips=%d, layers=%d", tex->name, mipCount, num_layers); + DEBUG("Uploading texture[%d] %s, mips=%d, layers=%d", (int)(tex-vk_textures), tex->name, mipCount, num_layers); // TODO this vvv // // NOTE: only single uncompressed textures can be resamples, no mips, no layers, no sides