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
1
Question by schwertfisch · Jan 20, 2011 at 08:58 PM · shadermaterialalphablendingtest

Alpha-test VS Alpha-blend shader

Making an iOS game. I've read in the Unity Manual --> Optimizing Graphics Performance, the following sentence, which I have trouble understanding:

Contrary to the desktop, alpha-testing is very expensive on iOS. If you can replace your alpha-test shader with alpha-blend, do so. Make sure your alpha-blended shaders do NOT contain "a very small cut-off value" alpha-test based "optimization" as such "optimization" will have negative performance impact on iOS.

For example, I have a shadow material applied on a plane that follows my object (to fake blob- shadow) and this is what I see in the Inspector when I select it: alt text

How can I find out if my shader is Alpha-test or Alpha-blend (whatever this may be... :-) )?

Comment
Add comment
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

1 Reply

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

Answer by Jessy · Jan 20, 2011 at 09:28 PM

Open the shader. Look to see if it uses AlphaTest or blending. If it's a surface shader, this will be behind the scenes - it's not documented how this is handled. Surface shaders won't be used with OpenGL ES 1.1; instead, open the Fallback shaders and check there, to see what is happening.

Efforts have been made to foolproof alpha testing for Unity 3. You should not have to worry about this with the built-in transparent shaders. "Cutout" shaders are alpha tested. You should avoid them, but if you need that effect, Unity foolproofs their usage.

I go into detail about this stuff in Chapter 7.

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 schwertfisch · Jan 20, 2011 at 09:49 PM 0
Share

Thank you very very much Jessy!

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

1 Person is following this question.

avatar image

Related Questions

Shader Doesn't Work On Android 1 Answer

How do you make an X-ray vision following the mouse? 1 Answer

How to Remove Shiny part of an alpha texture in Particle VFX,Particle System remove shiny part of alpha material 1 Answer

shader FX/water and diffuse texture alpha blend 1 Answer

Changing material color´s alpha in self iluminated shader 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