Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  3. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Few HDRP issues

Discussion in 'Graphics Experimental Previews' started by rz_0lento, Sep 15, 2018.

  1. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    While playing with latest SRP master and HD Lit Master node, I noticed two issues:

    1) issue: you can't ref the SRP packages from local folders as shader code then doesn't work with following:
    background: if I have my SRPs configured following way in my projects manifest (for example using new add package option on 2018.3.0b1 package manager):
    I get these errors for every single shader include on the current SRP master:
    This is happening now since the latest PR merge: https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/1975 as the including convention was changed.

    Is there anything one can do about this? it would be so handy to be able to ref these packages like before. I'm currently working around this local SRP ref issue by symlinking the actual folders so that they appear like they'd be physically located in my projects Packages -folder (copying the folders there would work too but that's harder to use with version control). This workaround fixes the shader includes, it's just the local folder ref (using "file" option in the manifest) that breaks.


    2) I did notice that while upcoming HD Lit Master node works in forward (Finally! other Shader Graph graphs fail when using forward), I did notice that pixels that use it get culled by the underlying geometry. It's like some check isn't in right place, this happens even on latest sg/lit-master-node.

    Safety helmet on this scene is the only item having SG shader made with HD Lit Graph:

    Edit: this seems to happen with linear and exponental fog and MSAA enabled. If I turn off fog and MSAA, it works.

    PS. I'm aware these issues are not present in currently released previews, only in bleeding edge github master and PRs that are WIP
     
    Last edited: Sep 21, 2018
  2. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    935
    Hi,
    For 1) We are developing on the master branch and master branch is only guarantee to work on latest (internal) trunk for C++. You have get a revision that will be compatible only with a future 2018.3 beta. This is expected.

    For 2) Forwarded to the team.
     
    rz_0lento likes this.
  3. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Thanks for the reply. I actually started to suspect this (and hoped it's changed internally). If it really works in the future releases with direct package refs, it will be great. I've converted some things into custom package manager packages in past and shader refs was always a painpoint as I had to convert things to use relative paths (Package/packagename -approach works already on cs side for current engine versions, just not with shaders).
    Would also like to add that the fog is the thing that clips the geometry like in that image, MSAA issue is bit different as it "bleeds" through geometry edges for objects behind it. It's really easy to spot all those issues using that HD template with forward only + MSAA and the having SG material on the safety helmet. Safety goggles next to it will then bleed though the helmet (while using MSAA) and helmet will also clip to the fog enabled background.
     
    Last edited: Sep 21, 2018
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Yeah we landed the change to 18.3 / <next> unity last week. It will start working soon :)
     
    rz_0lento likes this.
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    This is great, it will make porting assets into packages so much easier! :)

    Additional note to previous posts: #2 is most likely issue with all Shader Graph shaders when using HDRP in forward-only, I just didn't initially test this as the regular SG shaders fail on all ways in forward-only, upcoming HD Master Lit Node works there besides these mentioned two issues on my tests using 2018.3.0b1 and b2.
     
    Last edited: Sep 21, 2018
  6. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Also found this kind of issue with the latest master with initial VR support: dark spot appears to the opposite eye while tilting head, this artifact only shows in VR view (camera view doesn't have it on editor):


    Had this issue on 2018.3.0b1 and b2 and using "com.unity.xr.openvr.standalone": "1.0.1". Again, this could be issue with the beta I'm using but wanted to mention in case people forgot to tilt their heads while testing :)
     
  7. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Tested #2 on 4.0.0-preview, I've set HDRP Asset to use Forward-only and have set red colored HD Lit Master Node graph for few meshes on the scene. Everything works fine until I enable MSAA.

    No fog, no MSAA:


    Exp fog, no MSAA:


    These above cases are fine, no artifacts visible. Issues begin when I enable MSAA.

    No fog, MSAA (8x) enabled, notice the safety glasses edges bleeding through the helmet:


    Exp fog enabled, MSAA enabled. This pretty much is fully broken, everything on HD Lit Master Node material is basically rendered with the fog instead (notice how safety glasses edges still bleed through in this one as well):


    None of these issues are present with regular HD Lit material, only with Shader Graph shaders. PBR Lit Graph is broken as well while using forward only (These images were with HD Master Lit Graph which is what I'd want to primarily use).
     
    Last edited: Sep 29, 2018
  8. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    457
    Same problem here. Hope in a quick fix. At the moment I can't use Shader Graph custom shader
    because of this.
     
    rz_0lento likes this.
  9. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    @ArchVizPRO Forward + MSAA and HD Lit ShaderGraph issue has now been fixed in this PR:
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/2278
    Thanks to devs for finally fixing this! This was a showstopper for me so happy to see it got resolved :)

    It's not merged yet but I went ahead and merged it for testing purposes into my experimental SRP branch:
    https://github.com/0lento/ScriptableRenderPipeline/tree/experimental

    By the time I write this, experimental branch is just latest release/2018.3 branch with the MSAA fix PR.
     
    Last edited: Oct 25, 2018