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. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Wanted: High Definition Render Pipeline

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

  1. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Need some tips on using HDRP with PostProcessing stack !

    Currently i am using HDRP 4.3 and PostProcessingStack 2.1.2 with Unity 2018.3f2.

    As soon as i update HDRP to v4.6 i get errors. As i saw somewhere, HDRP should be having a custom PostProcessingStack implemented ( referred to as PPv3 ).

    So my question is - what version of HDRP is compatible with what version of PostProcessing stack and where to get them from ? Should i still be using HDRP 4.3 with PPStack 2.1.2 from package manager, or it is a good idea to update to Unity 2019.0 alpha and in that case where to get a compatible post processing stack to use with it, and is the PostProcessingStack v2 not compatible anymore with HDRP as i saw in the PostProcessingStack forum thread ?
     
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    To the best of my knowledge:

    The new custom PP only applies to 2019 and the 5.x branch of HDRP. Unity 2018.3 and HDRP 4.x still use a standard post processing package. And you don't have to specify this postprocessing package yourself because it is listed as a dependency in the HDRP package.json file (at time of writing GitHub release/2018.3 has moved on to version 4.8 with a dependency on post processing 2.1.2).

    So I don't think your issue is anything to do with future changes that affect 2019 & 5.x. And I would not move onto 2019 alpha at this stage, or at least there should be no need to do so to get things working right now.

    4.7.0 HDRP came out on GitHub recently, is it not available in the package manager yet?
     
  3. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    No, 4.7.0 is not yet available !

    It's weird though that as soon as i update HDRP from 4.3 to 4.6 in the project i am working on, i get some errors about not being able to find some kernels in compute shaders. This error is not present if i uninstall ShaderGraph.
    There are no errors in an empty HDRP project with HDRP 4.6 and ShaderGraph 4.6 installed however - weird !

    Using HDRP 4.3, the game just freezes at some point in time ( the build, not editor ) and i am not even able to build with Vulkan, because even the editor crashes when the Project window gets focuses ( not every time but often ). It seems, that HDRP does not like some of the assets in the project when i switch to Vulkan.

    Just curious if it's better to stay on 2018.3 and HDRP4.x or looking into 2019.x and HDRP 5.x in general !
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    ShaderGraph is much like what I said about PostProcessing, its listed as a dependency of HDRP and should be installed manually.

    During HDRP development & updates its certainly not been that unusual to hear about missing kernel and other errors, but these are often cured just by restarting Unity. Or removing packages and then re-adding them. Or manually finding the compute shader location(s) and reimporting/recompiling those files. Or take a copy of your project, delete the library folder and let it reimport & rebuild everything.

    As for whether to use 2019 at this stage, personally I am waiting till 2019 reaches beta. This is partly because when the 2019 alpha first came out, Unity HDRP staff mentioned on this forum that they were still focused on 2018.3 when it came to users trying their stuff. But this was a while ago now, so maybe that advice is out of date, but I am sticking with it for now. If there was something in 2019.1 of 5.x HDRP that I desperately needed, I would take a copy of my project and give it a try, safe in the knowledge I could always go back if things weren't working well for my project with 2019.
     
  5. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    That's not how it's supposed to work. The mesh decal material should be applied to a planar like mesh that is slightly hovering the surface mesh.
    Think of it like if you're applying a sticker on an object, and the mesh decal is the sticker geometry.

    Edit : Here's a good explanation image :
     
  6. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Can confirm the above method words well, and isn't restricted to planar meshes. I've used it for welds / stickers that wrap around steel pipes and it worked brilliantly.

    Probably one of my favourite additions in HDRP :) It just deals.
     
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    I see, that's pretty cool. Are mesh decals mainly intended for applying additional texturing/surface detail? I tried out my shattered glass decal as a mesh decal, simply putting my existing Decal material on a plane. It's much more transparent than when I use the same material as on a Decal Projector. Is that expected? Or is there a way to get full opacity on the mesh decal? Any alpha or transparency settings I can see are set as opaque as possible. (Here my mesh decal is on the left, and the projector is on the right).

    upload_2019-1-16_10-28-27.png
     
  8. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    When will HDRP leave experimental stage ?
     
  9. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    The target is 2019.3 .
     
  10. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    714
    So lets say that someone is aiming at shipping a game in late 2020, is it relatively safe to develop with HDRP? And will all major platforms be supported at that point?
     
  11. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Hi there. Could you explain what mean every of this paramater
    And why TilePass - Deffered Lighting pass take 3.1 ms?
    Also what light list hdrp build if i turnoff all light in scene and baked an lightmap? Wierd
    What is Color gaussian MIP chain and again why it take 2.1 ms???
    upload_2019-1-17_12-58-50.png
     
  12. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Is the GPU profiler suppose to work in builds, because it does in editor but does not in builds.
    Getting huge GPU spikes but can not debug !

    upload_2019-1-17_8-47-19.png
     
  13. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934

    Hi,

    Deferred Lighting pass is where all the lighting happen,
    it execute our lightloop for:
    - Directional Light, punctual ligth, area light, reflection probe, planar reflection, application of screen space reflection and the sky
    All in one.
    Cost may vary depends on how many lights you have if you are mixing different light type, and what features of Material you are using, if you use a mix of SSS and clear coat for example it increase the cost (this is due to material classification algorithm). In the debug windows (Analysis -> Debug Render Pipeline) in the lighting panel, you can display debug tile view and see what type of lights are present in tile and what variants are use for material classification.

    >Also what light list hdrp build if i turnoff all light in scene and baked an lightmap?
    I think that currently we don't turn off this pass even when there is no light at all. I added this on our todo.
    however have in mind that decals and density volume also use this build light list pass

    >What is Color gaussian MIP chain and again why it take 2.1 ms
    This is resolved scene color where we generated mips for Gaussian blur. This is use for refraction, for distortion and for Screen space reflection. If you disable these option it will be turn off. We work on optimization to lower the cost of it.
    note that there is one color pyramid step for refraction and one for distortion and SSR, so you need to disable everything if you want to save this cost.
     
    Last edited: Jan 17, 2019
    hippocoder and Danua like this.
  14. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi, Yes, this should be safe. However expect lot of code change in 2019.1 (and a bit in 2019.2). i.e if you modify a lot of code it will be a pain to merge. If you don't touch the code it is simpler.
     
  15. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi,

    current state:
    - We will release 4.8.0 today which is our most stable version with 2018.3 which is also stable. This is what we recommend.
    - Current 5.2.3 HDRP package isn't good and we don't recommend it. Next one 5.3.0 will contain a lot of change (support of multiviewport, PPV3, revamping of FrameSettings, decal shader graph, new reflection system, lot of code change etc...) but as a consequence will be unstable for few iteration with a beta of 2019.1 also unstable.
     
    Roni92pl, Reanimate_L, elbows and 2 others like this.
  16. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Will you optimize TilePass - Deffered Lighting comptutation further? 3 ms too much, for 1 reflection probe, transmission foliage, one direct light and baked shadowmap.
     
  17. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Please make HDRP 4.8.0 be available in package manager.
    Now it's only 4.6.
     
    MadeFromPolygons likes this.
  18. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    I'm also curious about the disconnect between what gets tagged as releases on the SRP GitHub account (https://github.com/Unity-Technologies/ScriptableRenderPipeline/releases) and what gets pushed to the package manager. 4.7 was "released" on GitHub, but is/was not on the Unity Package Manager.

    If I want to use 4.8 today, are the steps to doing this documented? Would I need to remove the existing HDRP package in unity, and manually place the github tag's/repo's content somewhere arbitrary in my project?
     
    konsic and Jick87 like this.
  19. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    When we produce a new package we perform some testing. If we discover a failure we don't release the package, so it doesn't appear in package manager. However it is still produce and tagged in github. So consider all not visible version as failing version.

    If you want to always use the latest code/version you can setup local package with source code from github. But be ready to suffer about breaking change/code :)
     
    Roni92pl and dgoyette like this.
  20. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Package 4.8.0 for HDRP is now available, here is the changelog (indcluding 4.7.0 that haven't been made public):

    ## [4.8.0-preview] - 2019-01-16

    ### Fixed
    - Fixed remove sync with render thread when updating decal texture atlas
    - Fixed issue with TerrainLit not compiling with depth only pass and normal buffer
    - Fixed geometric normal use for shadow bias with PBR master node in forward
    - Fixed error message when having more than one directional light casting shadow
    - Fixed issue with MicroShadowing and SpecularOcclusion
    - Fixed issue with vertex animation in shader graph not compatible with SRP Batcher

    ## [4.7.0-preview] - 2019-01-13

    ### Added
    - Added replace blending mode for distortion
    - Added icons for assets.
    - Added new UI for decal material to allow remapping and scaling of some properties
    - Added first draft of documentation for HDRP

    ### Fixed
    - Fixed normal map use for shadow bias with forward lit - now use geometric normal
    - Fixed transparent depth prepass and postpass access so they can be use without alpha clipping for lit shader
    - Fixed support of alpha clip shadow for lit master node
    - Fixed unlit master node not compiling
    - Fixed issue with debug display of reflection probe
    - Fixed issue with phong tessellations not working with lit shader
    - Fixed issue with vertex displacement being affected by heightmap setting even if not heightmap where assign
    - Fixed issue with density mode on Lit terrain producing NaN
    - Fixed issue when going back and forth from Lit to LitTesselation for displacement mode
    - Fixed issue with ambient occlusion incorrectly applied to emissiveColor with light layers in deferred
    - Fixed issue with fabric convolution not using the correct convolved texture when fabric convolution is enabled
    - Fixed issue with Thick mode for Transmission that was disabling transmission with directional light
    - Fixed issue on XBoxOne Player throwing error due to ICharpCode.NRefactory.dll
    - Fixed slowdow when enabling Fabric convolution in HDRP asset
    - Fixed specularAA not compiling in StackLit Master node
    - Fixed coat normal to be the neutral (geometric one) when coat normal is enabled but port is disconnected in StackLit master node.
    - Fixed missing multicompile for MSAA for AxF
    - Fixed Scene Color and Depth nodes for shader graph
    - Fixed SSR in forward
    - Fixed custom editor of PBR shader graph master node
    - Fixed issue with NewFrame not correctly calcualted in Editor when switching scene

    ### Changed
    - Update several properties naming and caption based on feedback from documentation team
    - Remove tile shader variant for transparent backface pass of lit shader
    - Rename all HDRenderPipeline to HDRP folder for shaders
    - Rename decal property label (based on doc team feedback)
    - Add command buffer parameter to all Bind() method of material
    - Lit shader mode now default to Deferred to reduce build time
    - Update UI of Emission parameters in shaders
    - Updated AxF shader
    - Improve shader variant stripping including shader graph variant
    - Micro-shadowing in Lit forward now use ambientOcclusion instead of SpecularOcclusion
     
  21. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, the errors i was talking about i a post above, that i got from upgrading 4.3 to 4.6 are present when upgrading from 4.6 to 4.8 now as well

    upload_2019-1-17_20-32-7.png

    Any idea what is causing these errors. I just updated HDRP and ShaderGraph to 4.8

    P.S. i am not sure how i got rid of the errors last time
     
  22. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Confirm - the same, Unity 2018.3.2f1 HDRP 4.6=>4.8
     
  23. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Now is ok - I remove VFX, install again and now HDRP 4.8 is fine
     
  24. whidzee

    whidzee

    Joined:
    Nov 20, 2012
    Posts:
    166
    Experimenting around I set my scene to use the lightweight render pipeline. i used the handy tool to convert all my shaders to use that pipeline. then i decided to try the HD render pipeline. the handy tool does not convert from lightweight render pipeline to the HD render pipeline. i now need to do it all by hand. This would be super awesome if the tool could handle this. especially as when you convert from lightweight to HD for the shaders in each material the material loses it's data like texture and all that. this is going to be a slow process
     
  25. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,753
    You're probably better off just reverting your project and adding HDRP and using the conversion tool.
     
  26. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    This is the expected behavior now. All punctual light including directional light disappear when perfectly smooth (as the light is infinitely small). There is a "max smoothness" parameters on the lights that allow to tweak this behavior ( i.e you control the value of max(roughness, 0.002)” in a way).
     
    ekakiya likes this.
  27. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, i am constantly showing these issues i am having and kind of asking for suggestion on how to debug.
    Really i am constantly getting spikes and i obviously can not get rid of them. As you can see the graph, the game is actually running really smooth, bot from time to time ( every few seconds ) there are some internal processing commands that are breaking the smooth experience.

    How one would deal with these spikes, can the current one showing the graph possibly be caused by incorrect setup or it is just a part of the HDRP pipeline. I really need to get rid of these spike, because they are ruing the smooth experience.

    So how to deal with it, and am i the only who experience this ? ( currently using HDRP 4.8 )


    Thank you !

    upload_2019-1-18_12-26-9.png

    After a few seconds

    upload_2019-1-18_13-6-38.png

    after 4 seconds

    upload_2019-1-18_13-7-34.png

    After 4 more seconds

    upload_2019-1-18_13-8-22.png
     
  28. deltamish

    deltamish

    Joined:
    Nov 1, 2012
    Posts:
    58
    Any leads ?
     
  29. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    elbows, Adam-Bailey, optimise and 2 others like this.
  30. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    I've been working with decals, and I'm having an issue where the rotation of my decal makes a big difference in its appearance. By "rotation", I mean the decals rotation around the surface normal. For example, here's a decal of mine, which faces into the surface, and I'm rotating it around that normal:

    Decal.gif

    At 0', it looks as I'd expect it to. At 180', it's extremely dark. Does this make sense? What am I doing wrong?
     
  31. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    When you see error on shader like this, it can mean few thing:
    - 99% of the time the error is not related to the shaders in the error message
    - You can have other C# error, fixe them first
    - You can have missing ressources assign in HDRP resources (see HDRP asset, HDRP resources properties, in the tab look at shader assignment). We get this when you update from one HDRP to another that have added extra resources sometimes.
     
  32. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi,
    Can't answer without project/source asset. Is the normal map in correct texture format ? what option have you enabled ? is affect normal on ? etc...
     
  33. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi, I will let other reply, internally we mostly use PS4 profiler to measure GPU time. Tool on PC are not a good fit for us and Unity don't have a reliable GPU profiler.
     
  34. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi,
    Sorry, need more information. Are you profiling in Editor or on a Player ?
    Do you have multiple camera ?
    You can disable color pyramid generation by disabling distortion, refraction and SSR.
    Which GPU card / system ?
     
    Vagabond_ likes this.
  35. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi, Sorry, without the scene we don't have enough information. AO only apply on GI (unless you also said to affect direct lighting), is your floor currently receiving any lightmap or lightprobe lighting ?
     
  36. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    Thanks, and sorry for the unnecessary post. It ended up being a normal map issue from the material I was using. Nothing to see here...
     
  37. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi there were no any other errors before i started upgrading the HDRP version. These were the only errors and i only was able to fix it by uninstalling the HDRP package and then install it again.
    It only happens when upgrading the package. Another user above stated that by uninstalling and installing the VFX package ( after it was upgraded ) the problem was fixed. So it should be some case with package upgrading.
    Got the same by upgrading 4.3 -> 4.6 and also 4.6 -> 4.8

    But as soon as it is fixed by reinstalling the package i don't think it is actually an issue !

    Thanks!
     
    Last edited: Jan 19, 2019
  38. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    First to mention that with installing 2018.3.2f2 the GPU profiler now works in debug builds.
    I did a profiling in editor and builds. The spikes are always there and constant ( every few seconds ) and always related to the render loop.

    I only have a single camera.
    My GPU is a bit old - 750 Ti, but note that in general i run the game at 60 FPS and it runs smooth except these annoying spikes. Running : Windows 10 x64, 16GB Ram nVidia 750 Ti 2 GB.

    I will try to disable the distortion, refraction and SSR and see if that helps.

    Edit: now with SSR and distortion options disabled ( couldn't find refraction option ), there are no more spikes and the game runs really smooth at 1600 x 900 with 60 fps which is great for this graphics card !
     
  39. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    @SebLagarde
    #HDRPBUG enabled SRP batcher make framedebugger useless it start to show unrelated statistics, also stats window show wierd stats, there is no shadow caster info
     
  40. deltamish

    deltamish

    Joined:
    Nov 1, 2012
    Posts:
    58
    Hey, yes the scene is also receiving light maps it the part of the same mesh as the wall . There are no light probes. i'll attach a scene and send it out in the evening .

    Thanks :)
     
  41. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi,
    i asked some time ago about Vulkan and DX 12 support... as i can remember, DX12 is not yet recommended because performance is lower than DX11 and Vulkan only misses some features but it should work !

    1. However, i create a new project 2018.3.f2 with HDRP 4.8, and when i add Vulkan platform i get this warning...

    upload_2019-1-20_10-24-9.png

    2. When i set Vulkan as current API, it does constantly spam these error even after restarting the editor.

    Is Vulkan actually supported or not, because i remember that i was running some older version of HDRP on vulkan in builds, but i am getting the errors at least since HDRP 4.3 ?



    upload_2019-1-20_10-25-16.png
     
  42. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Also, when attempt to build the demo scene using Vulkan ( related to the post above ), getting this:
    This is an empty HDRP 4.1 ( project ) updated to HDRP 4.8 and Vulkan API. No any assets were added to the project, so i guess you should be able to reproduce this with ease.

    Running on Windows 10, AMD FX 6100, nVidia GTX 750 Ti 2GB ( driver: 416.94 ), 16 GB Memory

    P.S. - just noticed it's something related to Post Processing. Not sure if this is up to SRP team or the Post processing team though !

    upload_2019-1-20_11-14-16.png

    P.S. - well it turns out that "Decals" are spamming one of the errors. Turning off decal support prevents that error, and after removing the Post-Processing stack package, i am able to build the demo scene in a simple HDRP using Vulkan.

    However may we get decals running in Vulkan and having some post processing as well ?
     
    Last edited: Jan 20, 2019
  43. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi. Could you give me some more information how you solved this via DepthPyramid?. I would need an 3 camera setup with depth post processing.
    Detail Car Interior UI streams no TAA, DOF, ColorGrading
    Near Car Interior , TAA, DOF, ColorGrading
    Far Environment , TAA , DOF, Color Grading
     
  44. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    Hi, since Unity removed multi-camera support in HDRP v4.2 my solution no longer works. Prior that version I used depth pyramide sampling in my post effects.

    You can look at the source code of HDRP:

    https://github.com/Unity-Technologi...nSpaceLighting/ScreenSpaceReflections.compute

    In the begining of ScreenSpaceReflectionsTracing method they sample DepthPyramidTexture and after that reconstruct the world space position of a given pixel.
     
  45. Jason-Michael

    Jason-Michael

    Joined:
    Jul 6, 2015
    Posts:
    20
    In HDRP the SAMPLE_DEPTH_TEXTURE macro seems to return a wrong depth value. Is there a function that can be called to get the correct depth in CGPROGRAM/ENDCG, or how do I get the correct depth ?
     
  46. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    is there an estimate when hdrp will be out of beta?
     
  47. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    469
    2019.3
     
  48. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    really?
    i have an asset pack i want to release using hdrp but i doubt its wise to do so cause its still in beta
     
  49. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Find an issue with the SceneDepth node, if i distort the depth UV there's a gap on the right side of the screen.
    I think it's the atlas empty space, any way to avoid this?
    upload_2019-1-21_22-31-19.png
     
  50. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Don't be lazy, it's mentioned on this page by Unity staff.