소스 검색

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() {
 	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 ) {
 	public function pushTarget( tex : h3d.mat.Texture, layer = 0, mipLevel = 0 ) {