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 Seth-Bergman · Jul 18, 2012 at 10:16 PM · androidmobilespritesalphaalpha channel

Android : safely using sprites w/ alpha channel?

Ok, I have a game for Android which is comprised of 2D sprites. I am currently using PNG's with transparency. Everything works, works perfectly on my Samsung Galaxy S, but I'm getting this warning for using the Transparent/Cutout/Diffuse shader:

Shader is using clip instruction (usually caused by alpha test). It might cause problems on some Qualcomm/Adreno drivers. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

But there's no cutout shader for mobile. So, can anyone tell me if there's a way to optimize textures with an alpha channel on mobile devices? And if not, how common will issues resulting from this be? Like I said, it works perfectly on my device. How common are these Qualcomm/Adreno drivers with the issues?

p.s. yes, I've researched this already online, and understand that as a rule using alpha channels on mobile is considered taxing on performance. Unfortunately, for the purposes of this game, it would be pretty unfeasible to try to get away from this method.

edit- oh yeah, forgot to mention, I'm also using a lot of these PNG's as GUI Textures, which seems to retain the alpha without a warning.. only objects in the scene with the image attached as a texture seem to throw out the warning. I am considering trying to put it all into GUI Textures, can anyone confirm if this would be preferable? Also, I'm curious to know exactly which devices contain the aforementioned drivers, so I could get hold of one to test with.. any help would be greatly appreciated!

EDIT: hmmm, yep, warning went away when I changed to Transparent/Diffuse. So I am assuming now that "Cutout" was the problem, which I guess I don't need, thought I did but I guess not.. Thanks!

Seems odd though, since cutout is all or none, while Transparent/Diffuse supports the full range.. I would think if anything it would be more taxing. Still wondering about this...

Comment
Add comment · Show 3
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 whydoidoit · Jul 19, 2012 at 10:48 AM 1
Share

Hmmm, I've had no problems - but I use an Unlit/transparent shader.

avatar image Seth-Bergman · Jul 19, 2012 at 10:55 AM 0
Share

ok, thanks.. I'll try that and see if it goes away :)

avatar image BigBlob · Jul 29, 2012 at 03:24 PM 0
Share

I use PowerPoint to make my textures since it has Transparency too

2 Replies

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

Answer by GianormousGames · Oct 18, 2012 at 08:03 PM

I traced crashed on HTC Thunderbolt into this. It's a really really really bad user experience - the phone locks up for 60 seconds and then reboots. If you're getting any of these warnings I'd recommend making sure your game runs on HTC Thunderbolt.

The cutout shaders have an alpha test that generates a clip instruction in the shader, which is why they generate the warning.

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 Seth-Bergman · Dec 10, 2012 at 10:56 AM 0
Share

thanks, for now this is clearly the best answer :)

looks like that has a Snapdragon S2 processor

http://www.qualcomm.com/snapdragon/devices/htc-thunderbolt

to be safe, I will get an HTC Thunderbolt, haven't got it yet though.. look forward to crashing it as described!

avatar image Paulius-Liekis · Oct 10, 2013 at 01:37 PM 0
Share

Can you somehow ifdef that instruction in the shader based "Qualcomm/Adreno" or simply "Android"?

avatar image
0

Answer by EthanWoo · Aug 20, 2013 at 04:38 PM

If you have a problem with shader due to building adk.

Try to build Android with Texture compression : Adreon ATC that is in the build setting you won't find any more " Shader is using clip instruction (usually caused by alpha test). It might cause problems on some Qualcomm/Adreno drivers."

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 Seth-Bergman · Aug 20, 2013 at 05:53 PM 0
Share

sorry, where exactly would I find this setting? I have looked through all the build settings but I am not finding this option..

avatar image kreso · Oct 08, 2014 at 10:00 PM 0
Share

I don't really see what does compression have to do with shaders but I did try this and it did not work. Seth, go to File->Build Settings-Select Android platform. You will see a dropdown for 'Texture Compression', you can select ATC (Adreno) or other texture compressions here.

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

9 People are following this question.

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

Related Questions

How to optimize multiple sprites,How to optimize multiple sprites? 2 Answers

Particles with the "Mobile/Particles/Alpha blended" look very dark on Nexus 4 0 Answers

Android touches wrong after using the application at least once 0 Answers

Android Game overheating Device 0 Answers

Google Play Realtime Multiplayer Only Works On One Account 0 Answers


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