Search Unity

Feature Request HDRP for mobile

Discussion in 'Graphics Dev Blitz Day 2023 - Q&A' started by DevDunk, May 25, 2023.

  1. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,058
    I would love to see HDRP having some support for mobile. The main requirement I see online is compute shader support, which is on vulkan.
    Right now you can't even try to run it because it simply does not build, which I find really dissapointing.
    It could be supported experimental, so not every feature might work perfectly, but it would be great to have at least some support.

    Especially for applied games this can be helpful, since many are small in scale, have a need for high quality visuals, and many times can only run on a few devices (which can be high end)
     
    linosia97 likes this.
  2. AljoshaD

    AljoshaD

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    232
    Thanks for your request. HDRP heavily relies on GPU compute. Its use of compute is designed from high end devices and would run very poorly on mobile GPUs, even if they support compute.
     
    Last edited: May 25, 2023
    icauroboros and ali_mohebali like this.
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,058
    Could you share what performance stuff like volumetrics would run on a SD 8 gen 2 or something like that?
    I personally doubt performance will be terrible if you just use the features you need, without having to make them yourself in URP
     
  4. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    108
    Hi @DevDunk

    Indeed supporting HDRP on mobile would be great, even experimental, but it would be a lot of work, add maintenance cost to HDRP, might pull HDRP features and systems down in order to maintain the compatibility.

    However, to give more details, we think that in the current state of the mobile market, devices, drivers and GPUs, and based on our experience with URP, VFX Graph, and consoles this effort would very probably lead to something very instable and not usable for most productions.

    First, a lesson learned with VFX Graph, is that support for compute on mobile is very unpredictable, unequal and fragmented. The more compute one uses, the more one hits a multitude of driver issues on many devices, even pretty high end and recent ones.

    But it is not just about Compute, but as well the fact that HDRP relies on many passes which also affect CPU consumption. Based on the previous generation of consoles hardware and prototypes to run on portable consoles, it can already be challenging if you want to run HDRP's specific features (somehow Steam Deck is actually running pretty fine with HDRP but is more a portable PC than a mobile device). While some phones from the past years could be compared to this generation of hardware, the required power consumption even on the CPU would very probably make it impracticable for commercial titles.

    URP is optimized for mobile in many ways (FP16 shaders, renderer optimized for tile based GPUs,...), and we currently see more opportunities to keep this split in terms of platform reach per pipeline, and use our time to better align the pipelines authoring and core feature while making features with scalability settings and architectures specifically designed for mobile on one side (targeting performance) or for PC/Consoles on the other side (targeting visual fideliity) rather than trying to squeeze features architected for PC and consoles into mobile hardware.
     
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,058
    Thanks for the more detailed explanation!
    Drivers and tiled GPUs can be a nightmare yeah
     
    linosia97 likes this.
  6. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    505
    Unity devs support 3 different pipelines and spend a lot of effort. Nanite/lumen also does not work on mobile devices, on ue5 it has only 1 pipeline. Why do unity devs need 2 different pipelines for this?
    I don't understand why you can't 1 pipeline with disabled functions for some platforms. You have been repeating the mantra "SRP extensible rendering" since 2017. Expand it? Let such features as clouds, volumetric light, etc. work only on a PC only?
    You created 2 different pipelines, now rewrite them for a common core and coexistence rendering in one project.
    But you still continue to think that 2 different pipelines are the best idea to support different platforms.
    5 years of development, 3 different pipelines, ugly URP (with innovative TAA in 2023 and point shadows), half of the features are deprecated or broken.
    What is the future of the engine? Beautiful HDRP demos for investors?
     
    linosia97 likes this.
  7. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    108
    Hi @kripto289 ,

    I understand your point, and looking at it straight, having a single pipeline would be much easier for everyone.

    It was not an easy one, but we took the decision to open our rendering pipeline and offer 2 specialized ones based on tens of thousands of games built with Unity, and between 10 to 20 years providing technologies to millions of creators.

    If 10 years ago, most users could create competitive content in terms of visual fidelity and performance building on top of a simple but powerful graphics engine, the market has evolved, both in terms of available technologies, hardware capabilities, competitive offerings and users expectations. It was not an opinion, but became just a production fact that more and more users needed to extend and modify the Built-in render pipeline more and more heavily, and in opposite directions whether they were doing mobile or PC/Consoles games; Many wanted to strip out some code which was preventing the pipeline to be performant on mobile, some wanted to write their own pipeline (eg: the Ori series), while others were spending years re-implementing features and implementing new features in order to compete visually with AAA (eg: Escape from Tarkov), or even implemented their own 2 dedicated render pipelines for mobile and PC/Consoles like Genshin Impact.

    So the conclusion was that one cannot rule all platforms, all users, all genre, all industries with a single rendering architecture. Unreal also has a dedicated renderer for mobile. Most AAA games shipping on mobile use a totally different rendering architecture. Here are the buffers used by each pipeline. As you can see, the more features you want to offer, the more complex becomes the pipeline, and the less cross platform it is.



    Now, proposing 2 different rendering architectures does not mean that they should be totally incompatible, and that is probably a mistake that we did at the time.

    We have been working in the past years to realign the 2 pipelines so that they share more and feel less like 2 products: Shader Graph to target multiple render pipelines, possibility to associate different pipelines to different quality tiers, shared rendering debugger, shared volume system, shared rendering layers, unification of the camera component, and now Render Graph...

    We have also improved feature parity in both ways (terrain details support for HDRP, URP dynamic resolution and FSR support, URP HDR output,...) and developed new features for both pipelines (SRP lens flares and screen space lens flares, Adaptive Probe Volumes). More and more game graphics features and effects can be made for both pipeline with Shader Graph (eg: shaders, full screen master node, custom render textures,...) and VFX Graph. There are still some feature differences but that will evolve (and as you said, that is ok - they have different requirements, cover different needs and different hardware range with different priorities-).

    But, while making sure to not diverge and keep the 2 pipelines converging, our first priority has been to make sure that URP and HDRP are the right solutions to replace and improve the Built-in render pipeline, so that as soon as possible we have 2 pipelines and not 3. This has taken longer than expected, but today we hear mostly great feedback from productions using them, and almost no new production starts on Built-in. New pipelines mean that there will always be things that people regret from the previous generation, but we do our best to make sure that this stays marginal.

    So, the future of the graphics engine is hopefully what you expect: a more unified authoring experience with scalable features running on a choice of 2 rendering architecture optimized for their platform tiers themselves running on a core cross platform and modern graphics foundation, all more customizable, more optimized and with more features than built-in. We are not there yet, but I hope that you can appreciate the steps already done.
     
    Ik-Dev, FizzFab, luisbazan and 7 others like this.
  8. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Ya. Actually it's all about best possible authoring experience that it just work nicely without needing to do insanely amount of work to get the expected result and keep fighting with a lot of urp/hdrp issues. Unity user not really care it's 2 or 3 render pipeline but when unity user very suffer when using urp/hdrp then they will care. Another is the smooth migration path from built-in to urp/hdrp.