Pārlūkot izejas kodu

Avoid scaling 2d textures that could be used as 3d (#3464)

riperiperi 3 gadi atpakaļ
vecāks
revīzija
5811d121df
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 8 0
      Ryujinx.Graphics.Gpu/Image/TextureCache.cs

+ 8 - 0
Ryujinx.Graphics.Gpu/Image/TextureCache.cs

@@ -174,6 +174,14 @@ namespace Ryujinx.Graphics.Gpu.Image
                 }
             }
 
+            if (info.Width == info.Height * info.Height)
+            {
+                // Possibly used for a "3D texture" drawn onto a 2D surface.
+                // Some games do this to generate a tone mapping LUT without rendering into 3D texture slices.
+
+                return false;
+            }
+
             return true;
         }