Search Unity

Help Wanted Lwrp and Shader Graph performance on mobile

Discussion in 'Shader Graph' started by ernakgl, Jul 11, 2019.

  1. ernakgl

    ernakgl

    Joined:
    Oct 9, 2018
    Posts:
    20
    Actually ı work on generally on mobile phones and ı use legacy vertex lit rendering path and lagacy shaders they are perfect for performance but lwrp and shader graph not. I make this but its not good for mobile:

    actaully lwrp dont have good performance for some mobile phone not ıphone ,a talking about android.
    I Use lowQualityLwrp but why it is dont give me good performance like legacy ?
     
  2. Fenixake

    Fenixake

    Joined:
    Jan 25, 2014
    Posts:
    76
    LWRP is garbage for low end mobile platforms, you are better off with the standard rendering pipeline.
     
    ernakgl likes this.
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,675
    I don't want to defend LWRP, but I think even if you wrote that shader by hand in the legacy RP, keeping the same logic, it would be pretty slow for old mobiles.

    Something more appropriate for older devices would be blending a couple of textures and distorting the UVs. It will look less fancy than procedurally generated Voronoi but it should be much faster, both in legacy and LWRP.

    It would be nice if Shader Graph could have something like a cycle cost per node (kinda like substance designer does it), so people can see where things get slow.
     
    Last edited: Jul 12, 2019 at 4:44 PM
    ernakgl likes this.
  4. Fenixake

    Fenixake

    Joined:
    Jan 25, 2014
    Posts:
    76
    Trust me, the legacy RP is faster to setup in order to get outstanding performance on mobile. This is the proof
    .

    Edit: Indeed blending 2 textures is a ton faster but you need to know that you have to avoid complex calculations on mobile platforms like Dot products and other like it.
     
    Last edited: Jul 12, 2019 at 4:42 PM
    ernakgl likes this.
  5. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    745
    It's important to understand that Shader Graph does every operation on a per-pixel basis, rather than doing some of the work on a per-vertex basis (for instance, UV modifications). This is a vital important performance factor on mobile hardware.

    Amplify Shader Editor has a "Frag to vert" node which specifies the input needs to be done in the vertex shader, and it's result passed to the fragment (pixel) shader. This'll hopefully be possible with Shader Graph in the future, but I suspect this will be a long time from now.

    Also what @AcidArrow mentions is very true. Generating complex noise patterns is something that needs to be avoided when performance is concerned.
     
    ernakgl and zhuchun like this.