Skip to content

Instantly share code, notes, and snippets.

@yasuakiohama
Created July 20, 2015 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yasuakiohama/0b792562b46c51d24a33 to your computer and use it in GitHub Desktop.
Save yasuakiohama/0b792562b46c51d24a33 to your computer and use it in GitHub Desktop.
Example-Diffuse Texture.Shader
Shader "Example/Diffuse Texture" {
Properties {
_MainTex ("Texture", 2D) = "white" { }
}
SubShader {
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf Lambert
struct Input {
float2 uv_MainTex;
};
sampler2D _MainTex;
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
}
ENDCG
}
Fallback "Diffuse"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment