Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

HDRP + Mobile (iOS) - Everything turns black

Discussion in 'High Definition Render Pipeline' started by rtilton1, Nov 13, 2020.

  1. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    I created a fresh HDRP project with Unity 2020.1.4f1. The example scene looks great. I then switch my build target to mobile and everything goes black. Why??? How can I get lighting to behave normally?
     
  2. merpheus

    merpheus

    Joined:
    Mar 5, 2013
    Posts:
    202
    You can't. Mobile platforms don't work with HDRP. Please proceed with URP if you want to go the mobile route.
     
  3. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    ... but the unity website says "For example, HDRP will only work on iOS if the iPhone model used supports Compute Shaders."

    That would mean it should work on the latest iPhones.
     
  4. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    191
    The keyword is "example". HDRP is just not designed with mobile in mind
     
  5. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,726
    The answers are correct, HDRP will not work for mobile, only built-in and URP. Why are you not using the latest LTS build?
     
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    HDRP is targeting desktop and generally is in an extremely unoptimized state right now, so is bad idea imo to use for desktop games even, with these in mind i would recommend not touching on HDRP until few years down the line or if need some offline style of rendering.

    And for sure would not serve any purpose on mobile, as is extremely heavy in general. The base shader is a true overkill.
     
  7. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
    HDRP is almost 3 year now, don't think it's worth to wait another 2-3-4-5 years in the hope that something will get better. If you need hi-end mobile graphics - it's better and faster to write custom rendering pipe.
     
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Or use standard pipeline or urp i suppose, which is mobile ready. I meant use for desktop on a few years that may get better optimized, of course not wait to use hdrp on mobile.
     
  9. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi,

    - IOS is indeed not supported currently supported for HDRP. Sorry for the bad documentation.
    - For remark about performance. Have in mind that HDRP is design for a given set of scenario for a given set of platform. i.e can be sum up as AAA for PC / Console. So indeed, if you don't fit this scenario, URP and builtin are better candidate. HDRP is bad at rendering simple scene with very few lights - URP and builtin are better at it. But is good at rendering a larger scene with lot of complex materials, effects and hundreds of lights (on HDRP targets platform) which others pipeline can't handle.
     
    warthos3399 likes this.
  10. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
    HDRP Is bat at rendering scenes with lot of lights too. Optimal number is around 20-30. And it's not just 24 light limit per tile, but huge CPU overhead in "PrepareLightsToGPU" pass, lack of distance light culling(fade distance affect only attenuation, not calculation), and insanely heavy light calculation function.
     
    d1favero and Ruchir like this.
  11. perholmes

    perholmes

    Joined:
    Dec 29, 2017
    Posts:
    296
    Why does everybody keep saying this? Do you have first hand experience? Is it really such a black and white thing that you make it out to be? Does it really hard-core categorically zero zilch totally not work whatsoever in a million years... or is it just slow?

    I get the feeling that people aren't speaking from personal experience. Unity does mention that it will work on high-end mobile. I want to see what that's like and how bad it is.

    I'm not buying that the people who say that there's 0.0000000% chance of it even compiling are actually speaking from experience. I feel like someone else said something on another forum, and it's a game of telephone. I'd LOVE to hear from someone who has actually output even a basic test scene, like the OP. There's too much superstition around this, and people who can't differentiate between "doesn't run well" and "doesn't run at all".
     
  12. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    191
    We are not saying that HDRP does not run on mobile but just saying that it is not designed for performing on mobile. For example, the HDRP code actually utilizes multiple rendering passes that fills HD textures which require a damning amount of fill rate, that for the common mobile devices, it simply is going kill rendering performance. It is the design of the pipeline that makes it unsuitable for common mobile game use-cases. But on the other hand, if you are trying to get a stunning demo to show to clients, you can utilize HDRP with your own customization to omit passes that you do not use, which is a good feature of the SRP as a whole.
     
  13. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    i take it that you didn't read @SebLagarde post above?
     
  14. slippdouglas

    slippdouglas

    Joined:
    Feb 11, 2013
    Posts:
    23
    In Unity 2021.1.7f1 (current lastest), Unity spits out repeated errors “Platform iOS with graphics API Metal is not supported with HDRP. Change the platform/device to a compatible one or remove incompatible graphics APIs.” when trying to build an HDRP project for iOS. So that appears to be a hard no from Unity.

    Also, @SebLagarde, the documentation (https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/index.html) hasn't been updated, now 5 months later. Your apology for the bad docs is starting to seem like corporate hand-waving, not an authentic apology.
     
  15. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    223
    I guess that with M1 chips in recent IOS devices and AMD's RDNA2 GPUs integrated soon with Samsung's Exynos SoCs (with hardware raytracing support!) you guys should seriously consider rethinking this issue.
     
  16. corveniaflint

    corveniaflint

    Joined:
    Mar 27, 2014
    Posts:
    3
    I agree, the documentation was confusing on that bit on HDRP for iOS. Should let the readers know to use URP for now.
     
  17. perholmes

    perholmes

    Joined:
    Dec 29, 2017
    Posts:
    296
    To be honest, we chose URP and never looked back. With rudimentary real-time GI and tessellation via Amplify or Better Shaders, I can't really point to what we're missing. I know HDRP offers more accurate light simulations, but I feel that these are details, and not things I notice on a regular basis. Assets we've purchased where the demos were in HDRP look the same to us in URP.

    So just dropping a note that the URP depression has mostly lifted for us.

    I do hope that Unity eventually sees the light and brings all of HDRP into URP as features that can be toggled. This whole render pipeline fragmentation must be, without question, the biggest mistake Unity has ever made. The entire eco-system has fractured, and even just answering the question of what pipeline to use has taken me a year. It has been a devastatingly bad decision. I want to believe the chatter that URP eventually will absorb HDRP.

    But until then, we're URP, and I like our visuals. To be honest, the real magic is in making good shaders and being good a blending textures. That's where 90% of what you see comes from.
     
    d1favero and Vectrex like this.
  18. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Maybe this helps out a bit: https://github.com/Unity-Technologies/Graphics/pull/5294

    Do you have some kind of profiling data for large no. of lights in scene with deferred or forward mode?
     
  19. Henrarz

    Henrarz

    Joined:
    Mar 20, 2016
    Posts:
    37
    I agree - if they support M1 Macs, there's nothing that prevents Unity from adding support for A14+ class devices.
     
  20. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    87
    Why HDRP still doesn't run on iOS in 2021? We now have M1 and A15 which offers significantly better performance than PS4 / Switch or any other previous gen platform. Why not just allow compiling to iOS and let developers experiment with it?? You already allow compiling to Mac M1 with HDRP but not to iPad with M1. They are exactly the same platform. This doesn't makes a shroud of sense anymore...
     
    Henrarz, korzen303 and d1favero like this.
  21. ustincameron

    ustincameron

    Joined:
    Oct 20, 2018
    Posts:
    5
    M2 just dropped. Time for HDRP to become standard.
     
  22. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    761
    Hi, I think some older versions of HDRP can run on mobile (without too many render errors)

    https://forum.unity.com/threads/using-hdrp-to-target-high-end-mobile.553939/#post-3702427
    upload_2022-6-8_14-13-28.png
    For example, reflection probes (not planar) will not work and I think it's something related to creating render texture (also the texture format). The whole screen will turn black.

    If you still would like to try, you may customize the HDRP package by:
    1. Move HDRP package from "...\Library\PackageCache" to "...\Packages" (to make it editable)
    2. Go to "HDRP-Package\Runtime\RenderPipeline\Utility\HDUtils.cs"
    3. Add Android/iOS support:
    upload_2022-6-8_14-9-19.png

    This repository is a good example (using Unity 2019.4):
    https://github.com/Infinity-Loops/Android-Unity-HDRP

    Last but not least, I suggest opening an empty scene and then try all the modification.
     
    Zypo likes this.