浏览代码

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;
 		}