Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by routitsm · Jan 30, 2018 at 12:29 PM · buildshaderssize

Why do shaders take up 21% of the overall build?

Hi,

I use only a handful of mobile shaders in my game. However the build report shows over 21mb of shaders included in the build! Where do they come from and is it possible to reduce this number?

Build Report
Uncompressed usage by category:
Textures 26.4 mb 54.8%
Meshes 1.2 mb 2.6%
Animations 11.0 kb 0.0%
Sounds 638.4 kb 1.3%
Shaders 12.1 mb 25.1% <<< HUGE!!!
Other Assets 2.1 mb 4.4%
Levels 0.3 mb 0.6%
Scripts 1.2 mb 2.4%
Included DLLs 3.9 mb 8.2%
File headers 329.8 kb 0.7%
Complete size 48.2 mb 100.0%

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image meat5000 ♦ · Jan 30, 2018 at 12:54 PM 0
Share

Could this be something to do with Variants being included?

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by routitsm · Feb 03, 2018 at 05:09 AM

I found it - the Broadleaf_Mobile from Standard Assets drags along with it 9Mb worth of shaders, textures and materials into the build. Not very "mobile", considering you are ideally trying to fit your game into a 100mb package.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by wilfy · Jan 30, 2018 at 01:23 PM

https://aras-p.info/blog/2015/01/14/optimizing-shader-info-loading/

Looks like this was/is a bug? What version are you running?

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image routitsm · Feb 02, 2018 at 05:53 AM 0
Share

I am using 2017.1 Linux

avatar image routitsm · Feb 03, 2018 at 10:26 PM 0
Share

running 2017.1

avatar image
1

Answer by DanVioletSagmiller · Jan 30, 2018 at 01:25 PM

Shaders typically are small, but depending on the amount of work done, a shader may have a different implementation for every system unity supports. What are your shader file sizes? I still find it hard to imagine 12 megs of shaders though. Can you share what shaders you are using?

Also, you could try putting the shaders in another project, attaching a simple material/object in a scene to each, build, then remove each shader 1 by 1 to see which is taking the most space. Depending on where/how you got the shader, you could probably talk to the developer of it for advice, or find a different shader.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image routitsm · Feb 02, 2018 at 06:00 AM 0
Share

I am using $$anonymous$$obile Diffuse and Vertex Lit for own models.

Some 3rd party assets use Nature/Speed Tree shaders and also some particle shaders for car effects, smoke etc.

I suspect it could be the Speed Tree shader. I saw some large numbers in the editor log file to do with the SpeedTree shader. Is there any shader for mobile that is like transparent diffuse? The Speed Tree shaders feel very bloated...

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

88 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Massive header size in build - Due to large number of assets(small) in resources folder. Any workarounds? 0 Answers

How much build size does text mesh pro increase in android???? 1 Answer

iOS app size is huge on devices while .ipa size is normal 0 Answers

iOS Itunes Connect app size increased by 30% when upgrade from 5.3.3 to 5.4.0. Why? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges