We’re doing an effect where we layer the background layers of our game blurred, using a render feature. We essentially do the same thing as the RendererListRenderFeature example, except that we render to a texture instead of the activeDepthTexture, and then blit that texture to the activeDepthTexture with a blur on another pass.
This works, but it’s more expensive than I’d like. One thing we have considered is that since we’re blurring everything on this layer anyway, we don’t really need to render it at a high resolution. If we could render in at 640x480 or something even lower, and then apply a light blur, we’d probably get roughly the same visuals at a much lower cost - at least in theory.
But I can’t really figure out how to render at a lower resolution using the render graph. I’m currently using RenderGraphBuilder.UseRenderList to filter the objects. There’s no examples anywhere of lower resolutions being used (except in downsampling scenarios, which is not what I’m looking for), and when I just try to naively use a lower resolution texture for my target, the render graph gives me errors because the resolutions missmatch.
Hmm, I guess I could use the depth buffer from my layer rendering to create the Shading Rate Image from that post?
That could for sure work! Thanks for the suggestion. I still want to try the lower resolution solution, though, as I suspect that that will help with my goal of blurring - our lead artist tells me that he’s seen better results from cheaper blurrs at low resolution than from expensive blurrs at full resolution. But I could try to apply variable rate shading as well.
Looking at it now, I found out the problem was on my end. I was doing something wrong!
In particular, I was still writing to the default depth texture. Which means that I was trying to render the color and the depth at different resolutions. That doesn’t make much sense!
So I think that rendering depth to my own texture and then blitting that back to the main depth might be my main approach.