Browse Source

forbid array of textures (should use TextureArray instead)

ncannasse 7 năm trước cách đây
mục cha
commit
b4f5bb9067
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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;