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

Feedback Wanted: High Definition Render Pipeline

Discussion in 'Graphics Experimental Previews' started by Tim-C, Sep 25, 2018.

  1. mephistonight

    mephistonight

    Joined:
    Dec 14, 2016
    Posts:
    75
    Please don't ever drop the HDLit standard shader as it is. The ability to use a shader that's optimised by default and uses all of the texture channels efficiently is really good.
     
    Zaax, tweedie and Tartiflette like this.
  2. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Texture packing in the Lit shader is a necessity imo - it was infuriating in the original (built-in) standard shader which had really arbitrary separation of maps, HDRP's is a huge improvement. Considering most modern tools like Substance let you configure an export preset with channels mapped how you choose, I don't think it's an issue for most people requiring the full brunt of HDRP. I think it's better to have Unity supply a fully optimised shader that gets maintained, and optimised with each release and have people wanting a split texture variant construct it in shadergraph (just a handful of nodes after all).
     
    Remy_Unity likes this.
  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,980
    Also considering a massive portion of the gamedev community use unity, whatever they choose as a standard will become a standard by habbit. I know too many artists that only know PBR in terms of the unity 5 standard shader maps, and making people use this as default will cause them to by habit use a more optimized packing structure.

    As you say, substance solves this issue, but also its pretty easy to pack stuff into channels now even without paid tools.

    Here is a good free tool for this:

    https://github.com/andydbc/unity-texture-packer

    I recommend unity simply supply a texture packer with the SRP and that will solve the issues!
     
    tweedie likes this.
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    "Fun" mostly unknown fact : the built-in standard shader uses a similar packing than HDRP :p :
    upload_2018-12-18_13-39-43.png
    upload_2018-12-18_13-39-57.png

    So you can use one map for Metallic (R),Occlusion (G) and Smoothness(A), exactly like in HDRP.
    If the detail mask map was using the blue channel instead of alpha, it could be exactly the same !
     
  5. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Huh, I knew Metallic and Smoothness were packed but always found it odd Occlusion got its own slot (given its grayscale) - I assumed the '(G)' was a typo as it didn't indicate which map it should be part of. That's really useful to know! :)
     
  6. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788

    In dire need of tesellations support, Color Pyramid Access and Depth buffer access in shader graph for HDRP, and custom renderpass and i swear i'll stop flooding this room :D
     
    Rich_A and petersx like this.
  7. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    Does the removal of multi-camera rendering effect UI(Screen space camera)? That is one use case where multi-camera rendering is necessary.
     
  8. Tartiflette

    Tartiflette

    Joined:
    Apr 10, 2015
    Posts:
    84
    @Reanimate_L Any chance you could share your material setup? I haven't managed to get refraction to work in the recent versions of the HDRP, so I must be missing something. I definitely have distortion enabled in the hdrp settings so it has to be my materials that aren't setup properly.
     
    id0 and darkydoodle like this.
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    No, I believe provision is made for the UI to be rendered separately for example multi resolution rendering would require it? Or do you mean deliberately rendering a 2nd camera for adding post effects to the UI separately?
     
  10. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    Yes, that is what I mean. Not just PP though, the "Screen Space camera" setting in the Canvas component allows a UI to appear to be rendered in the world(with perspective) while maintaining anchors, ect. Example effect I am going for-

    pp.png

    So far in my testing, I have found that Screen Space cameras do work... sort of. The problem is that Post Processing Temporal AA doesn't seem to effect my second camera(the one under the UI) and causes massive flickering. Even with the "Layers" set in the post-processing volume, I haven't been able to have different pp settings per camera. It seems like only 1 PP volume is respected. Maybe more of an issue with the Post Processing than HDRP though. Still, I hope this gets fixed some day.
     
  11. tetto_green

    tetto_green

    Joined:
    Dec 22, 2015
    Posts:
    35
    Could you share the solution please? Facing the same problem.
     
  12. ekakiya

    ekakiya

    Joined:
    Jul 25, 2011
    Posts:
    79
    The sun specular disappers on the material with the smoothness =1.
    Something like “max(roughness, 0.002)” in UnityStandardBRDF.cginc or clip the initial value of the Smoothness Remapping is great, I think.

    Tested on HDRP4.6.0 with Unity2018.3.0f2
     
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You should probably just render to texture then do a (it's very small) V2 post stack to blend that texture after post (you get options on how to do so here): https://github.com/Unity-Technologi...b/v2/Documentation~/Writing-Custom-Effects.md

    However I'd have thought that simply making sure your UI elements have a shader that renders in the correct pass would bypass any screen space effects anyway... I think. Maybe not bloom, but bloom probably can be constrained to work on HDR values.
     
  14. TimNick151297

    TimNick151297

    Joined:
    Apr 21, 2013
    Posts:
    21
    Is there currently any way to access the uvs of the distortion map? Can‘t find a way to offset or tile it in any kind.
    Has anyone found a solution for this?
     
  15. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    The distortion map on the HDRP provided shaders uses the same UVs as the rest of the "Surface" maps.
    But you can use shadergraph to handle yourself how you map the distortion. You'll need the Lit Master node, set to Transparent, and enable Distortion.
     
    TimNick151297 likes this.
  16. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    I have the same problem since HDRP 4.0. Both refraction and distiortion show me the black square. I know it's working, I switch on Vulkan and I saw refraction, but Vulkan unstable and it crash very soon. Before this effects works, I even make fancy heat for fire using distortion, but now everything is broken. I have GTX 750-ti and using dx 11. Right now I'm on last 2019 beta and HDRP 5.0. I have some problem with internet and can't send bugreport.
     
  17. alxndrhglnd

    alxndrhglnd

    Joined:
    Aug 10, 2016
    Posts:
    7
    How are things going with particle shaders?
     
  18. TimNick151297

    TimNick151297

    Joined:
    Apr 21, 2013
    Posts:
    21
    Thanks for your answer!
    Thanks for your answer! I can't, however, find a way to map the distortion in shadergraph. There's no Input for the map itself and I couldn't find a input for the distortion strength either.
     
  19. tetto_green

    tetto_green

    Joined:
    Dec 22, 2015
    Posts:
    35
    When will HDRP start supporting Vulkan? Approximately.
     
  20. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    It should work ( in general ). I tried it before. But i seem to get some errors now.
    Plus once a project did not wanted to start when i changed to Vulkan until i opened the PlayerSettings asset with text editor and changed some renderer ID ( i guess ) to DX11 ( took the number from another PlayerSettings asset ) and then the project was able to open again.

    Using HDRP 4.3 ( 4.6 is broken ) and just installed Vulkan and i get this error:

    upload_2019-1-2_17-28-39.png
     
  21. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    I checked with 2019.1.0a12 and the HDRP template, like I said :
    • create a HD Lit Master graph
    • Set Surface Type to Transparent
    • Enable Distortion
    upload_2019-1-3_13-52-34.png

    Send the distortion values you want to the distortion input, and the blur to the distortion blur. If you want to use a map, it's simply the matter of remapping the values you sample to your needs.
    To compare to the HDRP/Lit distortion with a map, your can do:
    • Distortion = ( texture.rg * scale + bias ) * intensity
    • Distortion Blur = texture.b * blurIntensity
     
    TimNick151297 and thelebaron like this.
  22. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    For my video above i'm just using refraction actually, not using distortion at all
     
  23. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    210
    Hi all. I'm curious about support for the Nintendo Switch with HDRP. I haven't found a lot of resources regarding it. My gut (and maybe memory) tell me that it doesn't but that LWRP does, but I can't really find anything to verify any of that. I may just be dense, but Google is failing me.
     
  24. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    467
    how to solve this problem (image)? it something to do with anti-aliasing but can't fix it in HD render. when you go far away its fine when very close also fine but in the midrange, you get strange artifacts.


    upload_2019-1-7_22-16-52.png

    same model in substance painter
    upload_2019-1-7_22-22-20.png
     
    JamesArndt likes this.
  25. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    237
    I would check your contact shadow settings and your HD shadow settings on the volume component. This does not seem to be a AA isuue
     
  26. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,980
    Could be mipmapping issue on textures import settings or normal map import settings
     
  27. TimNick151297

    TimNick151297

    Joined:
    Apr 21, 2013
    Posts:
    21
    Ahh, thanks a lot! Was doing some stupid mistakes there :D
     
  28. jhuynh_

    jhuynh_

    Joined:
    Sep 2, 2016
    Posts:
    7
    Does HDRP support WebcamTextures?
     
  29. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    Yes, nothing special here.
    You can use the following code to assign a WebcamTexture to an object for example:
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. [RequireComponent(typeof(Renderer))]
    4. public class WebCamTextureToMaterial : MonoBehaviour
    5. {
    6.     public string targetProperty = "_BaseColorMap";
    7.    
    8.     // Start is called before the first frame update
    9.     void Start()
    10.     {
    11.         var tex = new WebCamTexture();
    12.        
    13.         GetComponent<Renderer>().material.SetTexture(targetProperty, tex);
    14.        
    15.         tex.Play();
    16.     }
    17. }
     
  30. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Does it bug? Reflection probe and baked skybox doesn't affect by tonemapper in hdrp.
    So it leads to strange look this looks oversaturated
    with baked sky upload_2019-1-9_23-24-34.png
    without

    upload_2019-1-9_23-25-26.png
    skybox file attached
     

    Attached Files:

  31. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    PPV and scene volume settings
    upload_2019-1-9_23-27-21.png upload_2019-1-9_23-27-44.png
     
  32. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi, Currently Switch support is bad on HDRP (mainly due to performance). So officially it isn't supported.
    We continue effort on it but no guarantee that it will be supported
     
    sand_lantern likes this.
  33. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    How do you set up a planar reflections. In the image below, planar reflection probe is set on the floor ( overlapping the floor a little ) but reflections are not clear. All seems super blurred, and only gets super bright when i increase the Intensity Multiplier.

    upload_2019-1-11_11-1-21.png
     
  34. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    @Vagabond_ The planar reflection probe doesn't automatically transform the affected surfaces to mirror. The look of the reflections still depends on the surface data (albedo, metallic, smoothness, normal), exactly like cubemap reflection probes.
    If you want to have a mirror like reflection, replace the ground material by a white 100% metal and smooth material.
     
  35. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Ok, got it. I completely misunderstood the purpose of that reflection probe ! Thanks !
     
  36. deltamish

    deltamish

    Joined:
    Nov 1, 2012
    Posts:
    58
    2019-01-13 21_40_51-Window.png
    Post Processing Stack AO issue in HDRP
    Only objects and direct perpendicular are getting AO but floors are not at all effected. Gives a very fake lighting effect
     
  37. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Here is one major issue with unity in general but i start to think that it is actually unavoidable.
    Even the experimental incremental compiler in 2019 can't help here. Constantly getting these spikes every few seconds.

    My scripts - i did optimized them as much as i can but other allocations are problem too.

    upload_2019-1-14_7-36-29.png

    upload_2019-1-14_7-38-55.png
     
  38. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Is there anything I can do to keep decals from affecting every object in the world? Specifically, I'm trying to use decals to give a broken glass look, but the projector applies to everything. Is there more functionality for Decals in the pipeline?

    upload_2019-1-14_16-5-46.png
     
    id0 likes this.
  39. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    I'm curious about it too.
     
  40. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You currently can allow it per material via a tickbox to receive decals. This would help your glass, but obviously the wall could then not receive any decals.

    I would suggest detecting if it is near a wall and using a cropped decal (via the Crop Decal with Gizmo option). You may need a newer version of HDRP if you do not have it.
     
  41. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    This is not an option, because on the wall you might want another decal (concrete or metal)
     
  42. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Cropping is an interesting suggestion. That must be new in 4.6, or I don't remember seeing it before now. I see that cropping results in adjustments to UV scale and bias. Although it seems a little annoying, maybe I can rig up some kind of dynamic overlap test to figure out the ideal bounds of the decal to keep it from extending into neighboring geometry, and then deduce the correct uv bias/scale adjustments to prevent overlap. Sounds somewhat doable. Thanks for the suggestion.
     
  43. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It'll have to be... (or use gizmo to crop it).

    Yeah you'll have to for now. The HDRP team indicated this is as good as it gets or we're looking at decals that really don't perform well.

    HDRP is about lush visuals that still run fast so we'll have to make do. Don't forget shaped decals with Mesh Decals...
     
  44. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    How do those work? Should it behave like a decal projector, but cropped based on the shape of the mesh? I saw this quote in another thread:

    But if I create some mesh (here, a cube) and assign my decal material to it, it just acts kind of like a normal material, and doesn't project the decal onto overlapping geometry.

    upload_2019-1-14_21-46-14.png
     
  45. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    hippocoder, is it really impossible to make decal project only on one object?
     
  46. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    The decision if it will render what it touches is based on the material. There is no other way I know of. Have to get creative.

    If you search the forums you could find the related posts where staff mentioned decals in this context.
     
  47. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    @SebLagarde
    Hi, i've got issue with hdrp, it constantly load my gpu at 100%, it's occurs with our build, how I can contact with unity devs to show him our build, for helping us?
     
  48. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    HDRP is GPU Bound, so if you build your game with unlocked framerate it will be at 100% when you run it (even in an empty scene). If you build using Vsync locked at either 30 or 60 fps, even locking the FPS yourself you will see the utilization go down. (If you also don't have a lot of stuff if your game that also burdens the GPU but more than likely it will go down)
     
    Danua likes this.
  49. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    aha, it's awesome but, there only 42 fps and 100% gpu load
     
  50. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    This also depends on your hardware, assets, optimization, and quality settings on the HD Render Pipeline Asset. For me currently running HDRP with unlocked framerate in an empty scene (Build) maxes out at 400 fps. (This is with everything turned on except, High-Quality Volumetrics and High-Quality Subsurface scattering)

    Depending on your hardware that might be lower the rest depends on how you made your assets and optimization.