Hi,
I’m sort of new to shaders, so forgive me if this is a stupid question, but I’m having some trouble getting a shader to work across projects.
I took one of the default shaders and just made it so that it rendered on both sides, and was not see-through (by turning the Cull off , and the ZWrite on.
Here’s what the code looks like:
*Shader "Mobile/DRC_2SidedDiffuse" {
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 (A)", 2D) = "white" {}
}
Category {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
ZWrite On
Cull Off
Alphatest Greater 0
Blend SrcAlpha OneMinusSrcAlpha
SubShader {
Material {
Diffuse [_Color]
Ambient [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
Pass {
ColorMaterial AmbientAndDiffuse
Fog { Mode Off }
Lighting Off
SeparateSpecular On
SetTexture [_MainTex] {
Combine texture * primary, texture * primary
}
SetTexture [_MainTex] {
constantColor [_Color]
Combine previous * constant DOUBLE, previous * constant
}
}
}
}
}*
It works fine on my computer, so I handed it off to a programmer to put it in his project. When he brings it up in his project though it’s as if the shader is invisible. I’ve opened up this shader on his computer, and the code looks the same.
Here’s what it looks like on his computer:
And here’s what it looks like on my computer:
Would anyone have any idea why this is happening?
Thanks in advance for any help or suggestions.