Jelajahi Sumber

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

TothBenoit 11 bulan lalu
induk
melakukan
e72f676cea
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  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;
 		}