Renderpass help, depth buffer and upscaling

Hi team, as some of you have seen I’ve been working on a new volumetric light effect using render passes but theres two things I’m got questions on.

  1. Accessing depth. I’m having weird issues with depth where the effect appears in front of everything if ssao isn’t enabled (or worse is broken entirely). I’m guessing this related to the prepass and is because it loses access to the depth buffer? How do I ensure proper depth testing within a renderpass and do you have any recommendations on where in the renderpass order should an effect like this go (e.g. after taa, after bloom?)
  2. Upscaling, previously I was running an upscale after the effect ran. My presumption in the new architecture is to add the upscale Renderpass into “afterPass” but I can’t figure out how it knows what to upscale and how the result is handled. How are rendertargets handled inside renderpasses? I’m rendering the effect by setting scaleX/Y to 0.5 but I want the following pass to run an upscale afterwards to smooth out the edges but it seemingly has 0 effect.

Thanks y’all

I’ve mostly figured it out, theres something about having the ssao pass thats clearing the depth buffer. For upscaling I realised I wasn’t setting the result of the upscale as the texture exported from the rendering pass and so it had no result.

All working now

1 Like

Nice, glad you worked it out … sorry for a late response, I was away the whole week :slight_smile:

1 Like

I had to disable / remove ssao pass to fix the depth so its more of a workaround (I’ll need to double check that now I know it works).
I also got tricked by the DepthAwareBlur renderpass because it strips out the colour.
I’ll post an update to X later today on the progress :wink:

1 Like