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 lukesmith · Nov 04, 2013 at 12:10 AM · iostexturetransparency

iOS Transparent Texture Question

I'm working on an iOS project and I have a scene that uses one texture as an atlas for lots of objects textures. One of those objects uses transparency.

Is it best to keep it to one texture with a small section which is transparent, or to put the transparent map in a separate texture?

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
0

Answer by Eric5h5 · Nov 04, 2013 at 12:12 AM

It doesn't really matter; what actually matters is what shader you're using in the material. If you only use a transparent shader for the object that needs it, that's fine. If you're using a transparent shader for all objects regardless, that's bad.

Comment
Add comment · Show 6 · 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 lukesmith · Nov 04, 2013 at 12:43 AM 0
Share

But wouldnt the shader used be defined by the material? So in an atlas like I described it would be best to separate the transparent sections into their own texture/material?

I was just concerned about increasing draw calls / texture changes.

avatar image Eric5h5 · Nov 04, 2013 at 12:53 AM 0
Share

No...you should use a material with a transparent shader for the transparent object, and a material with a non-transparent shader for the rest. As I said, it doesn't really matter if you separate out the transparent part of the texture. You would be using two materials regardless.

avatar image alok1974 · Nov 04, 2013 at 03:50 AM 0
Share

You will get an extra draw call for each material. If you are not worried about fill rate too much then I advise to use just one material and keep it transparent. If you do have a concern about the fill rate then it is best to have two materials as Eric5h5 suggested.

avatar image Eric5h5 · Nov 04, 2013 at 01:54 PM 0
Share

It's 100% guaranteed that making everything transparent will be much worse than just having an extra draw call because of having two materials.

avatar image lukesmith · Nov 04, 2013 at 10:07 PM 0
Share

Even on iOS which has fill rate limitations?

Thanks for your advice I appreciate it.

Show more comments

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

17 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

Related Questions

Texture changes brightness at random – why? (on iPhone) 0 Answers

use Alpha from image in Fragment shader 0 Answers

show video frame on texture in ios 1 Answer

transparent background with GUI.DrawTexture 0 Answers

[ problem ] transparent 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