浏览代码

fixed getCurrentTarget() with MRT

Nicolas Cannasse 4 年之前
父节点
当前提交
050c8abea8
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 ) {