Browse Source

fix js sort shaders

ncannasse 7 năm trước cách đây
mục cha
commit
f44628f33c
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      h3d/pass/Default.hx

+ 2 - 2
h3d/pass/Default.hx

@@ -117,9 +117,9 @@ class Default extends Base {
 		var p = passes;
 		var shaderStart = shaderCount, textureStart = textureCount;
 		while( p != null ) {
-			if( !(shaderIdMap[p.shader.id] >= shaderStart) )
+			if( shaderIdMap[p.shader.id] < shaderStart #if !static || shaderIdMap[p.shader.id] == null #end )
 				shaderIdMap[p.shader.id] = shaderCount++;
-			if( !(textureIdMap[p.texture] >= textureStart) )
+			if( textureIdMap[p.texture] < textureStart #if !static || textureIdMap[p.shader.id] == null #end )
 				textureIdMap[p.texture] = textureCount++;
 			p = p.next;
 		}