• 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
3
Question by Logopolis · Feb 18, 2016 at 07:11 PM · androidunity 5depthdepth bufferz fighting

How to force Android to use a 24-bit depth buffer in Unity 5, to prevent z fighting?

I've been seeing problems in my game with "z fighting" between terrain and water. It looks perfect on PC, but on my Samsung Galaxy Note 8 Android device, the resolution of the depth buffer is inadequate and z fighting results in the appearance of what look like horizontal ridges at the water line. I was able to ameliorate t$$anonymous$$s problem by increasing the camera's near clip plane from 0.3 to 50.0, but the problem is still there (See image below).

Because it looks great on the PC, but the depth resolution is too coarse on the Android device, it appears that the Android device is using a 16-bit depth buffer rather than the standard 24-bit depth buffer.

Unity used to have a setting in the Android Player Settings, called "Use 24-bit Depth Buffer", to force an Android device to use a 24-bit depth buffer rather than 16-bit. T$$anonymous$$s option was removed in Unity 5. The notes on "What's new in Unity 5" (https://unity3d.com/unity/whats-new/unity-5.0) state "Replaced 16bit depth buffer support with the ability to completely disable depth and stencil buffers." T$$anonymous$$s seems to imply that 16-bit depth buffers are out, and all depth buffers will be 24-bit from now on, but nonetheless the poor depth resolution I'm seeing on Android (whereas the same game looks great on PC) indicates that in Unity 5 it's still using a 16-bit depth buffer on t$$anonymous$$s Android device.

Is there any way in Unity 5 to force an Android device to use a 24-bit depth buffer? Or any other solution to t$$anonymous$$s problem?

alt text

img-3003.jpg (96.3 kB)
Comment
Add comment · Show 4
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 hexagonius · Feb 18, 2016 at 09:16 PM 0
Share
avatar image Logopolis hexagonius · Feb 20, 2016 at 12:04 AM 0
Share
avatar image FortisVenaliter · Feb 18, 2016 at 10:03 PM 0
Share
avatar image Logopolis FortisVenaliter · Feb 20, 2016 at 12:10 AM 0
Share

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by PitaNGura · Apr 20, 2020 at 07:24 PM

Did you find any solution to your problem? I have a problem with an UI mask and I read online that the only fix is changing the depth buffer to 24 bit but it doesn't seem like having any way of doing that.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

65 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 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 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 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

Graphics/Shader on Android Device brokes down 1 Answer

Materials disappear Android 0 Answers

Webservices on android 0 Answers

How to let player know they have completed a Level,How to let Player know they have completed a Level 2 Answers

Continue developing in Android Studio 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