Browse Source

forbid array of textures (should use TextureArray instead)

ncannasse 7 years ago
parent
commit
b4f5bb9067
1 changed files with 2 additions and 0 deletions
  1. 2 0
      hxsl/Checker.hx

+ 2 - 0
hxsl/Checker.hx

@@ -762,6 +762,8 @@ class Checker {
 			case TStruct(_):
 				error("Array of structures are not allowed", pos);
 			default:
+				if( t.isSampler() )
+					error("Array of textures are not allowed, use Sampler2DArray instead", pos);
 			}
 			var s = switch( size ) {
 			case SConst(_): size;