Page 1 of 1

Unty 2019.1.1 HDRP and Noesis 2.2.2

Posted: 04 May 2019, 07:49
by MF_Andreich
Hi all... All looks like Noesis still not working with Unity HDRP in 2019.1.1. I try Noesis 2.2.2 from download section... May be I'm doing something wrong... but OnScreen and OffScreen render methods call fine (I'll check it with debugger)... but UI not showed in sample scenes.

Re: Unty 2019.1.1 HDRP and Noesis 2.2.2

Posted: 05 May 2019, 18:50
by MF_Andreich
Looks like HDRP call events in incorrect time (for Noesis), and common solution is very hard right now (HDRP is still preview... dont think that its matter for developers right now).
Anyway I write my own class for hold view and render it (not universal, just for my project) and this problem not actual.

Re: Unty 2019.1.1 HDRP and Noesis 2.2.2

Posted: 07 May 2019, 18:11
by jsantos
I remember LWRP + Noesis was working correctly in one of the latest beta, so maybe something changed in the final version or HDRP works differently. I will have a look as soon as possible. Could you please open a report about it?

Re: Unty 2019.1.1 HDRP and Noesis 2.2.2

Posted: 15 May 2019, 19:56
by jsantos
I tried again HDRP with Unity 2019.1.2f1 but unfortunately all the versions available in the Package manager do not compile. I tried 5.13.0, 5.10.0, 5.9.0, 5.8.2 and 5.7.2. Also I found this in the file HDRenderPipeline.cs
// TODO: Very weird callbacks
//  They are called at the beginning of a camera render, but the very same camera may not end its rendering
//  for various reasons (full screen pass through, custom render, or just invalid parameters)
//  and in that case the associated ending call is never called.
UnityEngine.Rendering.RenderPipeline.BeginCameraRendering(renderContext, camera);
We need the callbacks beginCameraRendering and endCameraRendering to be correctly invoked, in case they are not, as commented in the above line, NoesisGUI will not render correctly. I think we need to wait a bit more before HDRP is stabilized. Meanwhile the only solution is a custom integration as you did.

Re: Unty 2019.1.1 HDRP and Noesis 2.2.2

Posted: 18 May 2019, 05:01
by MF_Andreich
Sorry for delay in response... deadline =)

About HDRP I agree that right now very hard integrate into it... But I solve my problem by replacing NoesisView with my custom "renderer" without camera and SRP dependency. I cant show full code, but something I can tell:

1. I create base abstract renderer wich do all dirty work, but target UI size and aplying of RenderTexture happen in derived classes.
2. I dont use camera at all... UI always render in texture.
3. All events processed by Event.PopEvent(processingEvent) in LateUpdate, not by OnGUI method.
4. For rendering I dont use unity events. I use WaitForEndOfFrame coroutine for do off screen and on screen pass of Noesis with my own texture as target in one method. After it I call virtual PostRender method.
5. For render UI to full screen I use derrived class which implement UI size property from main camera size, and PostRender its just full quad render over GL class.

If you intresting in my solution, I can prepare some example project... without dependencies from some our custom classes or third party assets.