Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Tikigod · Apr 05, 2012 at 03:09 AM · shadermaterialbatching

Static batching only working with default diffuse?!?

Come across a bit of an oddity that I am unable to account for nor finding any previous examples of anyone having this specific problem elsewhere.

I have started work on a city generation script that uses a 2D array as a grid and places the same prefab floor tile to create the map floor, and initially static batching seemed to be working fine with editor testing reporting 3 draw calls and 3827 batched (using a larger grid to judge higher end load as I work on things).

However when I changed the tile prefab material from the default diffuse to a Diffuse/Bump shader static batching stops working completely even though nothing else has changed.

I have checked to make sure that the tiles aren't using instances of the material, and have also tried a few other shaders such as bumped/specular, specular and even made a custom bumped shader using Strumpy Shader Editor... but it seems static batching has completely stopped functioning for anything other than the bog standard diffuse material.

Is there something I am missing about static batching that could account for this by chance? Or is it safe to say this is a bug?

Edit: Forgot to mention, I have also created a new scene and tried dropping the prefab into the scene a few times to see if the problem was caused by my script, and the behaviour remains consistent and batching only shows as functioning using simple diffuse.

Additional information:

Unity version - 3.5.0f5 (latest release)

No real time or baked lighting is in place to interfere with the static batching.

Comment
Add comment · Show 2
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 Kryptos · Apr 05, 2012 at 07:53 AM 0
Share

I'm not sure but it is possible that static batching only works for one-pass shader or fixed function. Can anyone confirm that?

avatar image Tikigod · Apr 06, 2012 at 03:17 AM 0
Share

If this is the case, it strikes me as rather odd based on previous questions and forum threads I have read with people talking about static batching alongside transparent shaders and the such.

I am still slowly learning though and I will admit my knowledge of the guts of a shader is very basic so you could be right $$anonymous$$ryptos but if so it would seem static batching is rather ineffective at what it is meant to do surely?

1 Reply

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

Answer by Tikigod · Apr 07, 2012 at 03:38 AM

Ok, I did not realise that static batching was a Pro-Only feature as there wasn't any clear indication of it being so on the Unity webpage for batching.

So turns out my problem is that when changing the shader from a diffuse to a bumped diffuse that dynamic batching stops working rather than a problem with static batching which was never being used to start with.

As there are already a load of reports of dynamic batching problems with Unity 3.5, this question is pretty much closed I'd say.

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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Does material's shader realtion with batching ? 1 Answer

Why does the frame debugger say node uses different shader when it isn't? 0 Answers

Material doesn't have a color property '_Color' 4 Answers

Dynamic batching breaks with the material Mobile/Alpha Blended. 0 Answers

How to know if my Shader Graph is supported by the SRP Batcher? 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