diff --git a/core/rend/gl4/gldraw.cpp b/core/rend/gl4/gldraw.cpp index 6296f70e0..b64d24f91 100644 --- a/core/rend/gl4/gldraw.cpp +++ b/core/rend/gl4/gldraw.cpp @@ -76,7 +76,8 @@ static void SetTextureRepeatMode(int index, GLuint dir, u32 clamp, u32 mirror) template static void SetGPState(const PolyParam* gp) { - if (gp->pcw.Texture && gp->tsp.FilterMode > 1) + // Trilinear filtering. Ignore if texture isn't mipmapped (shenmue snowflakes) + if (gp->pcw.Texture && gp->tsp.FilterMode > 1 && Type != ListType_Punch_Through && gp->tcw.MipMapped == 1) { gl4ShaderUniforms.trilinear_alpha = 0.25 * (gp->tsp.MipMapD & 0x3); if (gp->tsp.FilterMode == 2) diff --git a/core/rend/gles/gldraw.cpp b/core/rend/gles/gldraw.cpp index 384ee3949..aa828c97d 100644 --- a/core/rend/gles/gldraw.cpp +++ b/core/rend/gles/gldraw.cpp @@ -147,7 +147,7 @@ template __forceinline void SetGPState(const PolyParam* gp,u32 cflip=0) { - if (gp->pcw.Texture && gp->tsp.FilterMode > 1 && Type != ListType_Punch_Through) + if (gp->pcw.Texture && gp->tsp.FilterMode > 1 && Type != ListType_Punch_Through && gp->tcw.MipMapped == 1) { ShaderUniforms.trilinear_alpha = 0.25 * (gp->tsp.MipMapD & 0x3); if (gp->tsp.FilterMode == 2) diff --git a/core/rend/vulkan/drawer.cpp b/core/rend/vulkan/drawer.cpp index 5cb540086..f1eaed192 100644 --- a/core/rend/vulkan/drawer.cpp +++ b/core/rend/vulkan/drawer.cpp @@ -189,7 +189,7 @@ void Drawer::DrawPoly(const vk::CommandBuffer& cmdBuffer, u32 listType, bool sor SetScissor(cmdBuffer, baseScissor); float trilinearAlpha = 1.f; - if (poly.tsp.FilterMode > 1 && poly.pcw.Texture && listType != ListType_Punch_Through) + if (poly.tsp.FilterMode > 1 && poly.pcw.Texture && listType != ListType_Punch_Through && poly.tcw.MipMapped == 1) { trilinearAlpha = 0.25 * (poly.tsp.MipMapD & 0x3); if (poly.tsp.FilterMode == 2) diff --git a/core/rend/vulkan/oit/oit_drawer.cpp b/core/rend/vulkan/oit/oit_drawer.cpp index 013397dfc..6d3d508b7 100644 --- a/core/rend/vulkan/oit/oit_drawer.cpp +++ b/core/rend/vulkan/oit/oit_drawer.cpp @@ -33,7 +33,7 @@ void OITDrawer::DrawPoly(const vk::CommandBuffer& cmdBuffer, u32 listType, bool SetScissor(cmdBuffer, baseScissor); float trilinearAlpha = 1.f; - if (poly.tsp.FilterMode > 1 && poly.pcw.Texture && listType != ListType_Punch_Through) + if (poly.tsp.FilterMode > 1 && poly.pcw.Texture && listType != ListType_Punch_Through && poly.tcw.MipMapped == 1) { trilinearAlpha = 0.25 * (poly.tsp.MipMapD & 0x3); if (poly.tsp.FilterMode == 2) diff --git a/core/rend/vulkan/pipeline.cpp b/core/rend/vulkan/pipeline.cpp index 6b8e2dfa6..1547b2889 100644 --- a/core/rend/vulkan/pipeline.cpp +++ b/core/rend/vulkan/pipeline.cpp @@ -301,7 +301,7 @@ void PipelineManager::CreatePipeline(u32 listType, bool sortTriangles, const Pol params.offset = pp.pcw.Offset; params.shaderInstr = pp.tsp.ShadInstr; params.texture = pp.pcw.Texture; - params.trilinear = pp.pcw.Texture && pp.tsp.FilterMode > 1 && listType != ListType_Punch_Through; + params.trilinear = pp.pcw.Texture && pp.tsp.FilterMode > 1 && listType != ListType_Punch_Through && pp.tcw.MipMapped == 1; params.useAlpha = pp.tsp.UseAlpha; vk::ShaderModule fragment_module = shaderManager->GetFragmentShader(params);