- Home /
 
2 sides-transparent shader ProblemA
Hello guys,
I have a 2 sided plane (sort of like a very thin box) to which I apply two different shaders. The first one is a regular defuse shader that renders 2 sides. Next is the plane with the mentioned shader:

The second one is a “2 sided-transparent shader” which renders with problems and I have no idea of why this is happening. Here is the code of the shader:
 Shader "Custom/DoubleSidedTransparent" {
     Properties {
          _Color ("Main Color", Color) = (1,1,1,1)
          _SpecColor ("Spec Color", Color) = (1,1,1,0)
          _Emission ("Emmisive Color", Color) = (0,0,0,0)
          _Shininess ("Shininess", Range (0.1, 1)) = 0.7
          _MainTex ("Base (RGB) Trans. (Alpha)", 2D) = "white" { }
      }
  
      Category {
          ZWrite Off
          Cull Off
          Alphatest Greater 0
          Tags {Queue=Transparent}
          Blend SrcAlpha OneMinusSrcAlpha 
          SubShader {
              Material {
                  Diffuse [_Color]
                  Ambient [_Color]
                  Shininess [_Shininess]
                  Specular [_SpecColor]
                  Emission [_Emission]    
              }
              Pass {
                  Lighting On
                  SeparateSpecular On
                  SetTexture [_MainTex] {
                      constantColor [_Color]
                      Combine texture * primary DOUBLE, texture * constant 
                  } 
              }
          } 
      }
 }
 
 
               Next is an image of the plane with this transparent shader applied:

You can see in the picture certain polygons that are not rendered correctly. If it’s possible could you tell me why is this happening? I'll attach the plane model in a 3ds format in a comment since I can't add more than 2 attachments. Thanks in advance.
Regards,
Sebastián
Here is plane model in a 3ds format, so you can see the problem by yourselves.
Come on! someone must know a thing or two about shaders. Right?
Your answer