Parcourir la source

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

riperiperi il y a 3 ans
Parent
commit
5811d121df
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  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;
         }