Skip to content

Instantly share code, notes, and snippets.

@sfszh
Created December 12, 2012 10:24
Show Gist options
  • Save sfszh/4266696 to your computer and use it in GitHub Desktop.
Save sfszh/4266696 to your computer and use it in GitHub Desktop.
second shader
Shader "Custom/testShader2" {
Properties {
_Color("Main Color",Color) = (1,1,1,1)
_SpecColor("Spec Color", Color) = (1,1,1,1)
_Emission("Emmisive Color", Color) = (0,0,0,0)
_Shininess("Shininess", Range(0.01, 1)) = 0.7
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
//Tags { "RenderType"="Opaque" }
//LOD 200
//
//CGPROGRAM
//#pragma surface surf Lambert
//
//sampler2D _MainTex;
//
//struct Input {
// float2 uv_MainTex;
//};
//
//void surf (Input IN, inout SurfaceOutput o) {
// half4 c = tex2D (_MainTex, IN.uv_MainTex);
// o.Albedo = c.rgb;
// o.Alpha = c.a;
//}
//ENDCG
Pass{
Material{
Diffuse[_Color]
Ambient[_Color]
Shininess[_Shininess]
Specular[_SpecColor]
Emission[_Emission]
}
Lighting On
SeparateSpecular On
SetTexture[_MainTex]{
Combine texture *primary DOUBLE
}
}
}
//FallBack "Diffuse"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment