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

[URP] UberPost included in build even if no prostprocessing

Discussion in 'Universal Render Pipeline' started by Captain_Flaush, Dec 6, 2019.

  1. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    Hello,

    The postprocessing shader is included in the build even if no postprocessing is done in the scene.
    Can be tested with the sample URP scene, by removing the post processing volume.
    Using unity 2019.3.01f

    Thanks!
     
  2. hellowill89

    hellowill89

    Joined:
    Jan 8, 2013
    Posts:
    45
    Yes, I have also realized this. Maybe you could make an issue for it as well so that it can be tracked?
     
  3. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    Ok. Submitted.
     
  4. hellowill89

    hellowill89

    Joined:
    Jan 8, 2013
    Posts:
    45
    What is the issue number. Can you link to it?
     
    itskarlos likes this.
  5. lostminds

    lostminds

    Joined:
    Jan 17, 2019
    Posts:
    51
  6. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    163
    I have the same issue. There are also a lot of FilmGrain texture that take up space in the build.
    All that in a fresh 2019.3 project without any scenes or other files.
     
  7. hellowill89

    hellowill89

    Joined:
    Jan 8, 2013
    Posts:
    45
    Still looking for the issue number
     
  8. lostminds

    lostminds

    Joined:
    Jan 17, 2019
    Posts:
    51
    The bug I reported on this in October 2019 was closed in fogbugz when I checked now, but I can't seen any explanation why. I can't find it in the issue tracker either (though that might be because it's so hard to find things there). Perhaps they couldn't reproduce the problem and never made an issue of the bug report. I've contacted them again asking them to reopen the bug and investigate it as it's clearly still a problem.
     
  9. xsasoftware

    xsasoftware

    Joined:
    Sep 6, 2017
    Posts:
    24
    Also, I see that in my Android build, post process add the dirt lens textures ( even if I removed them from post processing settings ). This texture is 22mb size. 1/3 of my game size.
     
  10. OwlBoy-

    OwlBoy-

    Joined:
    Dec 11, 2015
    Posts:
    24
    I am also seeing this issue. Unity 2018.4.19f

    Edit:
    As a workaround I used the Package Manager to uninstall PPv2, and did my build. It works but complicates doing a build.
     
    Last edited: Apr 1, 2020
  11. FranFndz

    FranFndz

    Joined:
    Sep 20, 2018
    Posts:
    178
    I tought that was normal, and the Uber shader is kinda huge. lols
     
  12. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    Back on this. They closed the ticket and said that it's normal for the shader to be included in the package and there is nothing they can do.
    Could you guys please also submit a ticket ?
     
  13. Eckster

    Eckster

    Joined:
    Feb 9, 2017
    Posts:
    18
    Any update on this?

    The main offenders I'm seeing:
    4.6 mb 1.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/UberPost.shader
    262.6 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/SMAA/AreaTex.tga
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Thin02.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Thin01.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium06.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium05.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium04.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium03.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium02.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium01.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Large02.png
    256.1 kb 0.1% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Large01.png
    62.5 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/FinalPost.shader
    60.0 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/BokehDepthOfField.shader
    46.1 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/Bloom.shader
    38.7 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/GaussianDepthOfField.shader
    37.5 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/SubpixelMorphologicalAntialiasing.shader
    37.1 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/LutBuilderHdr.shader
    24.1 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/CameraMotionBlur.shader
    17.9 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Particles/ParticlesUnlit.shader
    17.8 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/LutBuilderLdr.shader
    13.2 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/CopyDepth.shader
    11.5 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/ScreenSpaceShadows.shader
    11.0 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/PaniniProjection.shader
    10.0 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/Blit.shader
    8.1 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/Sampling.shader
    7.7 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/StopNaN.shader
    4.5 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/FallbackError.shader

    I'm definitely not using a lot of those postprocessing effects listed, I can understand that some are probably needed for dependencies, but this is a bit silly to add several MB to a project just for using URP.
     
  14. lostminds

    lostminds

    Joined:
    Jan 17, 2019
    Posts:
    51
  15. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    We will add the option to strip disable (and then strip) post-processing from build.
     
  16. lostminds

    lostminds

    Joined:
    Jan 17, 2019
    Posts:
    51
    That's great news @phil_lira . For future reference, when this is added could you add a reply here explaining where this setting can be found so we can all use it?
     
    virgobr, korbul and berkhulagu like this.
  17. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    159
    Eckster and BATTLEKOT like this.
  18. Eckster

    Eckster

    Joined:
    Feb 9, 2017
    Posts:
    18
    What are the odds of this making it into 2019.4 LTS?
     
  19. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    159
    This is something we really want to add to the LTS release so this will hopefully arrive in 7.5 along with other fixes. I can't fully say when we'll release that package but once we do I will try my best to include it.
     
    Last edited: Aug 6, 2020
    ROBYER1 and chrismarch like this.
  20. tildebox

    tildebox

    Joined:
    Nov 6, 2018
    Posts:
    38
    Is this in 2019.4 LTS?

    How I can strip all post-processing shaders and related assets from Unity builds using URP?
     
  21. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    159
    This will be in URP 7.x.
    I can't say exactly when it will arrive but it will come.
     
    Last edited: Oct 14, 2020
  22. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    438
    With 2020.1 having been released. I'm wondering if we can expect the fix to be ported to 8.x first or will it go through 7.x and then to 8.x?

    An empty, simple, WebGL build takes 5MB with Brotli. It would be 20% less without those assets, which is not inconsequential.

    Thank you
     
    chrismarch and tildebox like this.
  23. tildebox

    tildebox

    Joined:
    Nov 6, 2018
    Posts:
    38
    If there is no fix soon, please show us a workaround.
     
    Last edited: Aug 8, 2020
    KamilCSPS likes this.
  24. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    438
  25. tildebox

    tildebox

    Joined:
    Nov 6, 2018
    Posts:
    38
    @Elvar_Orn: It's october, still how long will it take?
     
  26. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    438
  27. Eckster

    Eckster

    Joined:
    Feb 9, 2017
    Posts:
    18
    The pull request was approved today, hopefully we see it soon, not sure if that change will get into 7.5.x?
     
  28. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    470
  29. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    438
    ihgyug and tildebox like this.
  30. Dawdlebird

    Dawdlebird

    Joined:
    Apr 22, 2013
    Posts:
    88
    So when is this coming? Says in that github link that it has been merged, but there is still no post processing toggle on the URP assets...
     
  31. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    438
    It's already there. You need Unity 2021.x.
     
  32. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    163
    How do I now get the FilmGrain textures out of my build?
     
  33. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    I am on Unity 2020.2 and URP 10.3.1, when will this feature be out?
     
  34. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    438
    I don't believe they are back-porting any URP features. Just bug fixes or critical features (PS5 support...).

    As such, it might never be made available for < URP 11.x (< 2021.x)
     
  35. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    This seems to contradict the Unity staff comments in this thread saying that it would get backported to URP 7?
     
    FlightOfOne likes this.
  36. Lemovision

    Lemovision

    Joined:
    Apr 6, 2020
    Posts:
    34
    This takes a lot of space in my WebGl build please fix T_T
    1.8 mb of UberPost...
    2.5mb of film grain...
     
  37. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    438
    Been fixed for almost a year now. Might want to update your version of Unity.
     
  38. Lemovision

    Lemovision

    Joined:
    Apr 6, 2020
    Posts:
    34
    I'm using Unity 2021.1
     
  39. Holocafe_Oliver

    Holocafe_Oliver

    Joined:
    Feb 15, 2019
    Posts:
    5
    We are using an older version for a project and found a workaround today to remove the film grain:
    1. Create a new PostProcessData object (Assets > Create > Rendering > Universal Render Pipeline > Post-process Data)
    2. Switch your inspector to Debug (Right click inspector tab -> Debug)
    3. In Debug Mode, you can access the Film Grain Textures
    4. You can't remove them, but I replaced all 10 with the same small white square texture
    5. Assign your new Post-process Data object to the Forward Renderer (Assets > Settings > ForwardRenderer)
    Now it simply loads your small texture once instead of 10 film grain textures. Not perfect, but at least something :)
     
  40. Lemovision

    Lemovision

    Joined:
    Apr 6, 2020
    Posts:
    34
    @Holocafe_Oliver Thanks for the tip!
    How about changing this zero?
    That seems to remove all textures
    Would it work, or create some errors?

     
  41. Holocafe_Oliver

    Holocafe_Oliver

    Joined:
    Feb 15, 2019
    Posts:
    5
    The 10 textures got recreated immediately for me. Your luck may vary :)
    I also found out that it is enough to inspect the ForwardRenderer object with the regular inspector. There we can access the data of PostProcessData as well and change the textures without having to switch to Debug mode.
     
  42. thebestgames2021

    thebestgames2021

    Joined:
    May 16, 2020
    Posts:
    1
    The best fix i have been using from start was to go to packages in file explorer. Search film grain and delete the content. Atleast, it doesn't come back unless you restart unity. So, I always do this before final build. Save about 2mb, which is huge when targeting mobile.
     
  43. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    105
    Has anyone found a way to remove the files in the Debugging folder? Example of one is:
    Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Fonts/PerfectDOSVGA437.ttf
    These are included because they're referenced by a file in the Resource folder - Runtime/Debugging/Prefabs/Resources/DebugUICanvas.prefab
    Comes to around 200k total - not as big as the textures, but still well worth removing on WebGL.
     
    viruseg and Wasp3r like this.