#HDRP custom pass inject before a specific object is rendered?

1 messages · Page 1 of 1 (latest)

slow river
#

I don't want to mess with render order, I just want to blit the camera color buffer to a temporary texture and pass that to the shader right before the object is rendered. Is this possible?

#

HDRP custom pass inject before a specific object is rendered?

chrome umbra
#

So, rendertexture?

slow river
chrome umbra
#

Sure, Shader graph has a node specifically for it too if you wanna do that

slow river
#

I just don't know how to do that

#

It is a transparent shader, so I want to preserve how the pipeline calculates depth with other transparent objects and capture the color buffer before it renders so that it includes the transparent objects behind it.

chrome umbra
#

Can you not set it to before transparents? I usually just use graphic buffers and blit using that and it seems to following the ordering of my objects without explicitly giving it an injection time.

slow river
chrome umbra
#

So what's the difference from using a transparent/opaque color buffer and blitting this texture yourself

chrome umbra
#

You're capturing all previous transparents and modifying it with a shader, then using that information for the next transparent?

slow river
#

Kind of, it is only for one custom shader and one object. I want to capture the color buffer right before the shader is rendered so that I can apply blur to it.

#

It is not a fullscreen shader either

#

I want it to include transparents that are behind it in the color buffer so it appears in the blur

chrome umbra
#

But anyway, usually if you can't do it with render objects, then you're doing some custom pipeline scripting.

#

Really though it seems like just passing in a transparent color buffer into your shader and modifying it there is all you need to do

slow river
slow river
#

Before transparent is too early, Before post process is too late. I want it to render transparents behind the object, blit the color buffer after, and then pass it to the shader, then render other transparents in front of the custom shader

chrome umbra
#

Yeah I see what you mean. I was thinking hey just save the current transparents and use them next frame but that probably doesnt fit the requirements

slow river
#

I think I would be double rendering all transparents in that case though

#

Because I don't think there is a way to manually render transparents and then have the pipeline skip them? Or is there a way to do that?

chrome umbra
#

Yeah, I'm not entirely sure. I'd imagine you have to draw them all manually via scriptable render pass and* by structuring a bunch of command buffers and calling draw and blitting between each call... or well blit before drawing what you need