Hi, I'm trying to combine the normal extrusion shader from the surface shader examples with a front face culling shader that only displays one solide color (no lambert, no UV texture) Basically combining normal extrusion:

with the backface shader:
Shader "BackFace" {
Properties {
_Color ("Backface Color", Color) = (.1,.2,.5,0.5)
}
Category {
ZWrite Off
Lighting Off
Tags {Queue=Transparent}
Blend SrcAlpha One
Color [_Color]
SubShader {
Pass {
Cull Front
}
}
} }
Here is what I have so far but I can't seem to combine both without removing the lambert part that generates shading. Any help is appreciated:
Shader "Example/Normal Extrusion" {
Properties {
// color is part of the backface shader
_Color ("Backface Color", Color) = (.1,.2,.5,0.5)
_MainTex ("Texture", 2D) = "white" {}
_Amount ("Extrusion Amount", Range(0,0.1)) = 0.05
}
SubShader {
Tags { "RenderType" = "Opaque" }
// backface shader part
ZWrite Off
Lighting Off
Tags {Queue=Transparent}
Blend SrcAlpha One
Color [_Color]
Pass {
Cull Front
}
// normal extrusion part
CGPROGRAM
#pragma surface surf Lambert vertex:vert
struct Input {
float2 uv_MainTex;
};
float _Amount;
void vert (inout appdata_full v) {
v.vertex.xyz += v.normal * _Amount;
}
sampler2D _MainTex;
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
}
ENDCG
}
Fallback "Diffuse"}