Browse Source

fix: Incorrect argument used to determine vector size on HLSL texel fetch operation ( fix #1255 )

Yanrishatum 7 months ago
parent
commit
c0a21f79ff
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hxsl/HlslOut.hx

+ 1 - 1
hxsl/HlslOut.hx

@@ -458,7 +458,7 @@ class HlslOut {
 		case TCall({ e : TGlobal(g = (Texel)) }, args):
 		case TCall({ e : TGlobal(g = (Texel)) }, args):
 			addValue(args[0], tabs);
 			addValue(args[0], tabs);
 			add(".Load(");
 			add(".Load(");
-			switch( args[1].t ) {
+			switch( args[0].t ) {
 			case TSampler(dim,arr):
 			case TSampler(dim,arr):
 				var size = Tools.getDimSize(dim, arr) + 1;
 				var size = Tools.getDimSize(dim, arr) + 1;
 				add("int"+size+"(");
 				add("int"+size+"(");