- Home /
Certain polygons of model rendered differently
Hello,
I have a 2 sided plane (sort of like a very thin box) to which I apply two different shaders (one at a time). 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 “Double 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.
Your answer
![](https://koobas.hobune.stream/wayback/20220613102804im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Plane model don't have 2side material 1 Answer
MMD How to export model and animations to Unity as 3rd person controller? 2 Answers
LightingLambert': cannot implicitly convert from 'half3' to 'struct UnityGI' 0 Answers
Imported FBX model is transparent 1 Answer
Imported model gives error: "Transform.rotation is no longer valid" 2 Answers