diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs
index e240d6495..ac4a7c1ab 100644
--- a/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs
+++ b/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs
@@ -494,7 +494,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
             }
             else
             {
-                context.Properties.Textures.TryGetValue(SetBindingPair.Unpack(texOp.Binding), out TextureDefinition definition);
+                context.Properties.Textures.TryGetValue(SetBindingPairWithType.Unpack(texOp.Binding, texOp.Type), out TextureDefinition definition);
                 bool hasLod = !definition.Type.HasFlag(SamplerType.Multisample) && (definition.Type & SamplerType.Mask) != SamplerType.TextureBuffer;
                 string texCall;
 
@@ -710,12 +710,12 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
 
         private static string GetSamplerName(ShaderProperties resourceDefinitions, AstTextureOperation texOp)
         {
-            return resourceDefinitions.Textures[SetBindingPair.Unpack(texOp.Binding)].Name;
+            return resourceDefinitions.Textures[SetBindingPairWithType.Unpack(texOp.Binding, texOp.Type)].Name;
         }
 
         private static string GetImageName(ShaderProperties resourceDefinitions, AstTextureOperation texOp)
         {
-            return resourceDefinitions.Images[SetBindingPair.Unpack(texOp.Binding)].Name;
+            return resourceDefinitions.Images[SetBindingPairWithType.Unpack(texOp.Binding, texOp.Type)].Name;
         }
 
         private static string GetMask(int index)
diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs
index be95e4531..85bd8ab48 100644
--- a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs
+++ b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs
@@ -154,9 +154,9 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
             }
         }
 
-        private static void DeclareSamplers(CodeGenContext context, IReadOnlyDictionary<SetBindingPair, TextureDefinition> samplers)
+        private static void DeclareSamplers(CodeGenContext context, IReadOnlyDictionary<SetBindingPairWithType, TextureDefinition> samplers)
         {
-            foreach ((SetBindingPair sbPair, var sampler) in samplers)
+            foreach ((SetBindingPairWithType sbPair, var sampler) in samplers)
             {
                 int setIndex = context.TargetApi == TargetApi.Vulkan ? sampler.Set : 0;
 
@@ -203,7 +203,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
 
                 if (sampler.ArraySize != 1)
                 {
-                    context.BindlessTextures[sampler.Type & ~(SamplerType.Shadow | SamplerType.Separate)] = (imageType, sampledImageType, sampledImagePointerType, sampledImageVariable);
+                    context.BindlessTextures[sbPair.Type] = (imageType, sampledImageType, sampledImagePointerType, sampledImageVariable);
                 }
                 else
                 {
@@ -218,9 +218,9 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
             }
         }
 
-        private static void DeclareImages(CodeGenContext context, IReadOnlyDictionary<SetBindingPair, TextureDefinition> images)
+        private static void DeclareImages(CodeGenContext context, IReadOnlyDictionary<SetBindingPairWithType, TextureDefinition> images)
         {
-            foreach ((SetBindingPair sbPair, var image) in images)
+            foreach ((SetBindingPairWithType sbPair, var image) in images)
             {
                 int setIndex = context.TargetApi == TargetApi.Vulkan ? image.Set : 0;
 
@@ -254,7 +254,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
 
                 if (image.ArraySize != 1)
                 {
-                    context.BindlessImages[image.Type] = (imageType, imagePointerType, imageVariable);
+                    context.BindlessImages[sbPair.Type] = (imageType, imagePointerType, imageVariable);
                 }
                 else
                 {
diff --git a/src/Ryujinx.Graphics.Shader/StructuredIr/SetBindingPairWithType.cs b/src/Ryujinx.Graphics.Shader/StructuredIr/SetBindingPairWithType.cs
new file mode 100644
index 000000000..67213c495
--- /dev/null
+++ b/src/Ryujinx.Graphics.Shader/StructuredIr/SetBindingPairWithType.cs
@@ -0,0 +1,48 @@
+using System;
+
+namespace Ryujinx.Graphics.Shader
+{
+    readonly struct SetBindingPairWithType : IEquatable<SetBindingPairWithType>
+    {
+        public int Set { get; }
+        public int Binding { get; }
+        public SamplerType Type { get; }
+
+        public SetBindingPairWithType(int set, int binding, SamplerType type)
+        {
+            Set = set;
+            Binding = binding;
+            Type = type;
+        }
+
+        public override bool Equals(object obj)
+        {
+            return base.Equals(obj);
+        }
+
+        public bool Equals(SetBindingPairWithType other)
+        {
+            return other.Set == Set && other.Binding == Binding && other.Type == Type;
+        }
+
+        public override int GetHashCode()
+        {
+            return HashCode.Combine(Set, Binding, Type);
+        }
+
+        public int Pack()
+        {
+            return Pack(Set, Binding);
+        }
+
+        public static int Pack(int set, int binding)
+        {
+            return (ushort)set | (checked((ushort)binding) << 16);
+        }
+
+        public static SetBindingPairWithType Unpack(int packed, SamplerType type)
+        {
+            return new((ushort)packed, (ushort)((uint)packed >> 16), type & ~(SamplerType.Shadow | SamplerType.Separate));
+        }
+    }
+}
diff --git a/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs b/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs
index 62013ac98..05b6faee8 100644
--- a/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs
+++ b/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs
@@ -6,15 +6,15 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
     {
         private readonly Dictionary<SetBindingPair, BufferDefinition> _constantBuffers;
         private readonly Dictionary<SetBindingPair, BufferDefinition> _storageBuffers;
-        private readonly Dictionary<SetBindingPair, TextureDefinition> _textures;
-        private readonly Dictionary<SetBindingPair, TextureDefinition> _images;
+        private readonly Dictionary<SetBindingPairWithType, TextureDefinition> _textures;
+        private readonly Dictionary<SetBindingPairWithType, TextureDefinition> _images;
         private readonly Dictionary<int, MemoryDefinition> _localMemories;
         private readonly Dictionary<int, MemoryDefinition> _sharedMemories;
 
         public IReadOnlyDictionary<SetBindingPair, BufferDefinition> ConstantBuffers => _constantBuffers;
         public IReadOnlyDictionary<SetBindingPair, BufferDefinition> StorageBuffers => _storageBuffers;
-        public IReadOnlyDictionary<SetBindingPair, TextureDefinition> Textures => _textures;
-        public IReadOnlyDictionary<SetBindingPair, TextureDefinition> Images => _images;
+        public IReadOnlyDictionary<SetBindingPairWithType, TextureDefinition> Textures => _textures;
+        public IReadOnlyDictionary<SetBindingPairWithType, TextureDefinition> Images => _images;
         public IReadOnlyDictionary<int, MemoryDefinition> LocalMemories => _localMemories;
         public IReadOnlyDictionary<int, MemoryDefinition> SharedMemories => _sharedMemories;
 
@@ -22,8 +22,8 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
         {
             _constantBuffers = new Dictionary<SetBindingPair, BufferDefinition>();
             _storageBuffers = new Dictionary<SetBindingPair, BufferDefinition>();
-            _textures = new Dictionary<SetBindingPair, TextureDefinition>();
-            _images = new Dictionary<SetBindingPair, TextureDefinition>();
+            _textures = new Dictionary<SetBindingPairWithType, TextureDefinition>();
+            _images = new Dictionary<SetBindingPairWithType, TextureDefinition>();
             _localMemories = new Dictionary<int, MemoryDefinition>();
             _sharedMemories = new Dictionary<int, MemoryDefinition>();
         }
@@ -40,12 +40,12 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
 
         public void AddOrUpdateTexture(TextureDefinition definition)
         {
-            _textures[new(definition.Set, definition.Binding)] = definition;
+            _textures[new(definition.Set, definition.Binding, definition.Type & ~(SamplerType.Shadow | SamplerType.Separate))] = definition;
         }
 
         public void AddOrUpdateImage(TextureDefinition definition)
         {
-            _images[new(definition.Set, definition.Binding)] = definition;
+            _images[new(definition.Set, definition.Binding, definition.Type & ~(SamplerType.Shadow | SamplerType.Separate))] = definition;
         }
 
         public int AddLocalMemory(MemoryDefinition definition)