Help Please, how can I Do HDRP + custom pass + fullscreen + shaderGraph
Hey, I am trying to use custom pass in hdrp and create a fullscreen(imageEffect) using shaderGraph. (like in : https://www.youtube.com/watch?v=FpvJAG6R99k&ab_channel=IronStarInteractive) I was able to transfer the screen/custom buffer to rendertexture:
protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
{
RTHandle source;
if (targetColorBuffer == TargetBuffer.Camera)
GetCameraBuffers(out source, out _);
else
GetCustomBuffers(out source, out _);
Vector2 viewportScale = new Vector2(source.rtHandleProperties.rtHandleScale.x, source.rtHandleProperties.rtHandleScale.y);
CoreUtils.SetRenderTarget(cmd, RenderTexture);
HDUtils.BlitTexture(cmd, source, viewportScale,0.0f, false);
now I want a simple Blit like cmd.Blit(RenderTexture, RenderTexture2, Material); with my Material that will be made from ShadeGraph. I tried many different ways and was unable to solve this, however during my testing in some rare cases I did sometimes saw a small triangle that was drawn to RenderTexture2, so I might be missing something related to viewport/scale/etc..
Answer by yoavhops · Nov 14, 2020 at 04:07 PM
Hey, if any one else got this issue, here is an ugly workaround, If someone knows how to do it with nicer code and without the big QUAD(bigger then screen), I would love to know how..
what I did here is basically created a big QUAD that is bigger than the screen, and draw the result on a QUAD using the screen position as the UV.. so the QUAD size doesn't matter and it behave as a image effect..