diff --git a/src/client/refresh/vk/vk_image.c b/src/client/refresh/vk/vk_image.c index 670e421e..20aed629 100644 --- a/src/client/refresh/vk/vk_image.c +++ b/src/client/refresh/vk/vk_image.c @@ -858,15 +858,16 @@ Scale up the pixel values in a texture to increase the lighting range ================ */ -static void Vk_LightScaleTexture (byte *in, int inwidth, int inheight) +static void +Vk_LightScaleTexture(byte *in, int inwidth, int inheight) { int i, c; byte *p; p = (byte *)in; - c = inwidth*inheight; - for (i=0 ; i>= (int)vk_picmip->value; - scaled_height >>= (int)vk_picmip->value; - } - - if (scaled_width < 1) - scaled_width = 1; - if (scaled_height < 1) - scaled_height = 1; - - *texBuffer = malloc(scaled_width * scaled_height * 4); - if (!*texBuffer) - Com_Error(ERR_DROP, "%s: too big", __func__); - - *upload_width = scaled_width; - *upload_height = scaled_height; - - if (scaled_width == width && scaled_height == height) - { - memcpy(*texBuffer, data, scaled_width * scaled_height * 4); - } - else - { - ResizeSTB(data, width, height, - *texBuffer, scaled_width, scaled_height); - } - - // world textures - if (type != it_pic && type != it_sky) - { - Vk_LightScaleTexture(*texBuffer, scaled_width, scaled_height); - } - - while (scaled_width > 1 || scaled_height > 1) - { - scaled_width >>= 1; - scaled_height >>= 1; - if (scaled_width < 1) - scaled_width = 1; - if (scaled_height < 1) - scaled_height = 1; - miplevel++; - } - - return miplevel; -} -#endif - /* =============== Vk_Upload8