• 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
Question by YoungDeveloper · Sep 13, 2015 at 09:55 PM · materialtransparencyfadestandard

Transparent Fade Depth

Im having a problem sorting out fade transparency, for some polygon parts its rendered on top of front polygons.

Here's a visualization.

I tried tweaking default standard shader fade, but no results. I downloaded shader source and edited a lot of thing's, but its always something else and not this problem. Any hints or suggestions? Thanks

Comment

People who like this

0 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 Glurth · Sep 13, 2015 at 11:06 PM 1
Share

I don't see where it's supposed to "Fade"(a gradual transition) in your link. I DO see the incorrect z-ordering. What is supposed to be different from the standard shader?

avatar image YoungDeveloper · Sep 13, 2015 at 11:11 PM 0
Share

@Glurth The standard shader itself produces this kind of result, i have fade rendertype, alpha to 100% and its already producing wrong results. I tried to edits things in shader source but i cant seem to understand what exactly has to be done.

I believe here's the part

 // ------------------------------------------------------------------
         //  Base forward pass (directional light, emission, lightmaps, ...)
 Pass
         {
             Name "FORWARD" 
             Tags { "LightMode" = "ForwardBase" }
 
 
             Blend [_SrcBlend] [_DstBlend]
             ZWrite [_ZWrite]
 
 
             CGPROGRAM
             #pragma target 3.0
             // TEMPORARY: GLES2.0 temporarily disabled to prevent errors spam on devices without textureCubeLodEXT
             #pragma exclude_renderers gles
             
             // -------------------------------------
                     
             #pragma shader_feature _NORMALMAP
             #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
             #pragma shader_feature _EMISSION
             #pragma shader_feature _METALLICGLOSSMAP 
             #pragma shader_feature ___ _DETAIL_MULX2
             #pragma shader_feature _PARALLAXMAP
             
             #pragma multi_compile_fwdbase
             #pragma multi_compile_fog
                 
             #pragma vertex vertForwardBase
             #pragma fragment fragForwardBase
 
             #include "UnityStandardCore.cginc"
 
             ENDCG
         }


avatar image Cherno YoungDeveloper · Sep 20, 2015 at 09:38 PM 0
Share

This, unfortunately, is normal behavior. transparent faces have z-order issues, that's why things like windows etc. are commonly seperate meshes (gameobjects) than their surrounding walls/buildings.

0 Replies

· Add your reply
  • Sort: 

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

30 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

Related Questions

Metallic/Specular map broke fading in build 0 Answers

Fading a GameObject in/out 1 Answer

Transparency / Fade Material Shading Issues 0 Answers

How to add a FADE effect only on a side of a model? 0 Answers

Is there a shader in Unity that prevents transparent parts from overlapping? 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