diff --git a/runtime/nvn/vulkan/textures.c b/runtime/nvn/vulkan/textures.c index d86a03dc..94535b84 100644 --- a/runtime/nvn/vulkan/textures.c +++ b/runtime/nvn/vulkan/textures.c @@ -194,7 +194,8 @@ static bool format_is_float(VkFormat f) { // (uncompressed: these can hold NaN // forward-shaded surfaces take their shadows from it (issue #101) // RS_MAP AppMap's terrain capture (2250x1080: its 1500x720 layout at 1.5x, exec.c map_capture_patch): RS_OUT's // vertical scale on both axes. At its guest size it held one map texel per 1080p pixel, so at 4K the map -// was the 1080p picture stretched 2x +// was the 1080p picture stretched 2x. Also the HUD minimap's capture (288x288: its 192x192 pane at 1.5x, +// drawn from the map tiles and put through the round mask onto the HUD), for the same reason static float g_rs[4][2] = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; static uint32_t g_shadow_size; void renderer_get_scale(float *sx, float *sy) { *sx = g_rs[RS_OUT][0]; *sy = g_rs[RS_OUT][1]; } @@ -255,6 +256,7 @@ static uint8_t tex_scale_group(const NvnTexture *t) { if (!vk_shadow_direct() && vk_is_shadow_copy(t)) return RS_SHADOW; // (the copy's readers use the cascades instead) if ((t->target != 1 && t->target != 4) || t->samples > 1 || !(t->flags & 9) || t->width < 32 || t->height < 16) return RS_NONE; if (t->target == 1 && t->width == 2250 && t->height == 1080) return RS_MAP; // (and its depth target, if any) + if (t->target == 1 && t->width == 288 && t->height == 288 && t->format == 0x3d) return RS_MAP; // (the minimap's) float a = (float)t->width / (float)t->height; if (a < 1.74f || a > 1.81f) return RS_NONE; if (t->flags & 1) return RS_OUT; // NVN_TEXTURE_FLAGS_DISPLAY: the images the game presents diff --git a/runtime/nvn/vulkan/vk.h b/runtime/nvn/vulkan/vk.h index 1351c79c..c53ea666 100644 --- a/runtime/nvn/vulkan/vk.h +++ b/runtime/nvn/vulkan/vk.h @@ -105,8 +105,8 @@ VkDescriptorSet vk_alloc_set(VkDescriptorSetLayout layout); // ---- textures (textures.c) // Render-target scale groups (textures.c tex_scale_group): none, the 3D scene's (internal resolution), the final -// image's (the window's resolution), shadow maps (Video > Shadow resolution), the map's terrain capture (the window's -// height, without the HUD handling RS_OUT passes get) +// image's (the window's resolution), shadow maps (Video > Shadow resolution), the map's and the minimap's terrain +// captures (the window's height, without the HUD handling RS_OUT passes get) enum { RS_NONE = 0, RS_SCENE = 1, RS_OUT = 2, RS_SHADOW = 3, RS_MAP = 4 }; // A texture's claim on the write watch (textures.c, SAVAGEWIND_VK_CPU_OPTS bit 32): token 0: none