소스 검색

VolumetricLighting : Fix depth bound as target and param during upsampling pass

TothBenoit 11 달 전
부모
커밋
e72f676cea
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      hrt/prefab/rfx/VolumetricLighting.hx

+ 2 - 0
hrt/prefab/rfx/VolumetricLighting.hx

@@ -325,12 +325,14 @@ class VolumetricLighting extends RendererFX {
 			case AlphaMultiply: AlphaMultiply;
 			}
 
+			r.ctx.engine.pushTarget(r.textures.hdr, 0, 0, NotBound);
 			upsamplingPass.pass.setBlendMode(b);
 			upsamplingPass.shader.source = tex;
 			upsamplingPass.shader.sourceDepth = halfDepth;
 			upsamplingPass.shader.destDepth = depth;
 			upsamplingPass.shader.inverseProj = inverseProj;
 			upsamplingPass.render();
+			r.ctx.engine.popTarget();
 
 			depth.filter = prevFilter;
 		}