Przeglądaj źródła

fixed getCurrentTarget() with MRT

Nicolas Cannasse 4 lat temu
rodzic
commit
050c8abea8
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      h3d/Engine.hx

+ 1 - 1
h3d/Engine.hx

@@ -311,7 +311,7 @@ class Engine {
 	}
 
 	public function getCurrentTarget() {
-		return targetStack == null ? null : targetStack.t;
+		return targetStack == null ? null : targetStack.t == nullTexture ? targetStack.textures[0] : targetStack.t;
 	}
 
 	public function pushTarget( tex : h3d.mat.Texture, layer = 0, mipLevel = 0 ) {