Search Unity

Shader memory usage between unity 5.6.3 and unity 2018.1.2

Discussion in 'Web' started by roka, Jun 5, 2018.

  1. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
    Hello,

    By testing my game on the unity 2018.1.2f1, i have see that my webgl build use more memory than on the unity 5.6.3p4, so i have profiled it and this is the memory result for the shader part :

    unity 5.6.3p4

    https://imgur.com/KYfHYzX

    The listed shaders (30) is correct and the size is correct too.

    Now , unity 2018.1.2f1

    https://imgur.com/Q4yPM9O

    The list lenght is 110 now and my project do not use them.
    You can also see that the "Particles/Standard Surface" use 34MB.
    Also, on all listed shader not referenced, i have the message "asset has been edited and not yet saved to disk"

    If someone use 2018.1.2f1, can you profile it to see if you got the same?

    @Marco-Trivellato do you have any idea?

    Thank you everybody.
     
    mros and StaffanEk like this.
  2. Marrt

    Marrt

    Joined:
    Feb 7, 2012
    Posts:
    613
    I got the same thing "Particles/Standard Surface" takes 35MB

    upload_2018-8-18_20-22-33.png

    My build is for Android though


    EDIT: it just vanished... not sure if this did it, but here is what i did:

    1. moved the folder "builtin_shaders-5.6.2f1" within my project while unity was running
    2. everything got pink and unity crashed
    3. moved folder back while unity was closed
    4. reopened unity
    5. didn't check for the 35MB shader this
    6. called Resources.UnloadUnusedAssets() several times while doing something else
    7. now the 35MB shader is gone

    EDITEDIT:
    now its back...
     
    Last edited: Aug 18, 2018
  3. avi9111

    avi9111

    Joined:
    Feb 24, 2016
    Posts:
    31
    hello. I encounter the same problem. I have to figure out why

    EDIT:
    I think it's the editor issue, may be unity need this shader to render Editor Scene,
    and it did scale me for the 35M memory by default.
    your answer inspired me that Memory usage in editor is not as it would be in a player
    If you try to deploy it on web, webplayer may not have momory like that
    Here is my log in Android platform, the number of shader 16 are dam right
    QQ截图20180920192251.png

    by the way, here is my setting Edit - > Project Settings -> Graphics
    QQ截图20180920193628.png
     
    Last edited: Sep 20, 2018