Page 1 of 1

[RECOVERED] Unity SRP (HDRP) Compatibility

Posted: 03 Nov 2018, 23:30
by jsantos
Our database got corrupted and we lost the content of this topic. Please, help us to recover this discussion.

Re: [RECOVERED] Unity SRP (HDRP) Compatibility

Posted: 07 Nov 2018, 01:20
by elecman
So did you test the Unity HDRP and LWRP yet?

Re: [RECOVERED] Unity SRP (HDRP) Compatibility

Posted: 07 Nov 2018, 13:26
by Lacuna Corporation
I take it this was my original post.

Just to recap, tl;dr is the SRP does not yet expose critical hooks (which is technically a good thing as they've removed a lot of monobehaviour ties from the pipeline), such as OnPostRender, which means that they have to be hooked up manually.

Working around the asmdefs of the SRP (which pose another issue in general I'm about to make a post about), I found that the best way to set this up was to make a one-way link out of the SRP asms to an event holder (in my case SRPUtilities, exposing an SRPUtilities::OnPostRender event) which is exposed to the Noesis asm. Then, from the pipeline's Render override (e.g. HDRenderPipeline::Render), you dispatch it after all cameras have been rendered. Then, in Noesis initialisation, it's as simple as;
RenderPipeline.beginCameraRendering += PreRender;
SRPUtilities.OnPostRender += OnPostRender;
Everything is working fine on the rendering side for me with the HDRP with this hook.

Re: [RECOVERED] Unity SRP (HDRP) Compatibility

Posted: 07 Nov 2018, 20:18
by jsantos
I also tried something similar and it is working fine. Not sure how to deploy this to clients though. That's something we will figure out once we release the first beta of 2.2 for Unity.