From afd92bb3f97e6b3d8c3ac8090022c8bc03dc9dcf Mon Sep 17 00:00:00 2001 From: Goober5000 Date: Thu, 22 Oct 2026 23:47:54 -0400 Subject: [PATCH] honor material texture addressing in Vulkan Vulkan never read the material's texture addressing, so MR_FORCE_CLAMP skyboxes were sampled with a wrapping sampler, producing seams. Set it on every material draw, as OpenGL does in opengl_tnl_set_material(). Co-Authored-By: Claude Opus 5.5 --- code/graphics/vulkan/VulkanDraw.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/graphics/vulkan/VulkanDraw.cpp b/code/graphics/vulkan/VulkanDraw.cpp index bb38156ca2..e33f25105a 100644 --- a/code/graphics/vulkan/VulkanDraw.cpp +++ b/code/graphics/vulkan/VulkanDraw.cpp @@ -1281,6 +1281,9 @@ bool VulkanDrawManager::applyMaterial(material* mat, primitive_type prim_type, v m_frameStats.applyMaterialCalls++; + // Like opengl_tnl_set_material(), every material draw sets the texture addressing (e.g. MR_FORCE_CLAMP skyboxes) + setTextureAddressing(mat->get_texture_addressing()); + // Build pipeline configuration from material PipelineConfig config = buildPipelineConfig(mat, prim_type);