- Home /
Transparent Fade Depth
Im having a problem sorting out fade transparency, for some polygon parts its rendered on top of front polygons.
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
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?
@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 { "Light$$anonymous$$ode" = "ForwardBase" }
Blend [_SrcBlend] [_DstBlend]
ZWrite [_ZWrite]
CGPROGRA$$anonymous$$
#pragma target 3.0
// TE$$anonymous$$PORARY: GLES2.0 temporarily disabled to prevent errors spam on devices without textureCubeLodEXT
#pragma exclude_renderers gles
// -------------------------------------
#pragma shader_feature _NOR$$anonymous$$AL$$anonymous$$AP
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPRE$$anonymous$$ULTIPLY_ON
#pragma shader_feature _E$$anonymous$$ISSION
#pragma shader_feature _$$anonymous$$ETALLICGLOSS$$anonymous$$AP
#pragma shader_feature ___ _DETAIL_$$anonymous$$ULX2
#pragma shader_feature _PARALLAX$$anonymous$$AP
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#pragma vertex vertForwardBase
#pragma fragment fragForwardBase
#include "UnityStandardCore.cginc"
ENDCG
}
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.