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 deepthinker · Jun 01, 2012 at 01:01 PM · textureiphoneslowinvisible

textures become invisible as player moves

I am developing a 2d game in unity for the iphone.

Basically there is an imported object with multiple planes over each other with each having a different texture. My problem is that when the player moves foward (the texture represents the ground scenery below the player and the camera view is from the top towards the ground), a texture becomes invisible, like the houses in the scenery become invisible and the ground below them shows.

The planes are spaced above and below each other and not in the same z which would cause problems.

Also, adding the ground plane decreases the fps drastically.

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
Best Answer

Answer by Wolfram · Jun 01, 2012 at 01:30 PM

Assuming your various layers use Transparent or Particle shaders, your problem is the automated z-sorting for transparent objects. You can fix this if you add scripts to your layered objects that modify the material.renderQueue. So for the floor you'd leave the material.renderQueue unchanged, for the next layer you'd add +1 to it, and so on.

Another approach is, if your layers don't use semi-transparent pixels and only use fully opaque and fully transparent pixels, use the "Cutout" shaders instead of the "Transparent" ones.

The drop in fps is on iOS, or also in the Editor? I knwo that at least the iPad 1 and probably iPhones have severe bottlenecks in pixel fill rate, i.e., rendering several large planes/objects on top of each other. Not sure how much this has improved with iPad 2/3

Comment
Add comment · Show 4 · 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 deepthinker · Jun 01, 2012 at 01:34 PM 0
Share

the drop in fps is also in the editor!

avatar image deepthinker · Jun 01, 2012 at 01:37 PM 0
Share

yes the layers use transparent shaders

avatar image Wolfram · Jun 03, 2012 at 09:34 AM 0
Share

So the solution is modifying the renderQueues.

avatar image deepthinker · Jun 04, 2012 at 10:08 AM 0
Share

yes, that removes the flickering!

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

GUI refresh time on platforms slower than Unity Editor 1 Answer

Why the "target texture" option is enabled in Unity iPhone Advance for all the cameras? 3 Answers

BUG: Editor shows no GameObjects 1 Answer

Get a portion of a Texture2D to another Texture2D 1 Answer

Is there a way to export a terrain texture. 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