realgamessoftware / dear-imgui-unity

Unity package for Dear ImGui
MIT License
466 stars 115 forks source link

HDRP support #11

Closed EMBYRDEV closed 2 years ago

EMBYRDEV commented 4 years ago

This isn't complete as I need to fix some alpha issues (however I have 0 experience writing shaders with unity and HDRP) and add support for procedural rendering.

One of the things that seems strange to me is that alpha blending works perfectly when injected "Before Transparency" but it affects eye adaptation and stops the rendering of transparent objects. Probably a fairly simple fix but we really want it to be injected after post processing which is where issues occur.

If one of the devs here would be willing to look into this you'll probably have more success than me but for now this is a perfectly functional port to the HDRP and this PR could help some people who need support ASAP and get the ball rolling on 100% accurate support.

EMBYRDEV commented 4 years ago

Quick demo screenshot.

image

nothke commented 4 years ago

Thanks for that! But I'm not exactly sure how to set it up with HDRP. The "render feature" part of the docs confuse me. Does that even exist in HDRP?

EMBYRDEV commented 4 years ago

@nothke no, that is a URP feature. You can check out the updated read me with HDRP setup here.

Just right click in your scene, add a custom render pass volume and add a Dear ImGui pass after post processing. Make sure you actually pull down this pull request as this isnt actually integrated into the main repo yet, it's a request for the developers to do so :)

nothke commented 4 years ago

Ahhh, got it now! But still doesn't work..

Is this the correct setup:

image

I'm getting profiler sample errors:

image

nothke commented 4 years ago

Correction: it works, but still getting these profiler errors, that's obviously a Unity issue as they come from the pipeline.

Btw, I'm on 2020.1 beta, using latest packages

EMBYRDEV commented 4 years ago

Yeah those are caused by Unity by the looks of it. I never touched the profiler and I wasnt getting any warnings on 2019.3

harishl commented 4 years ago

This is very useful. Thanks @MissEmbyr ! @goncalo Would be useful to have the alpha issues resolved. Any advice?

trapazza commented 4 years ago

Hi @MissEmbyr - Thanks for your work, really appreciated 🥇

Have you figured out how to fix the apha issue? Also, in order you use your changes, should I just overwrite the contents of the original package with yours?

Thanks 👍