Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active January 7, 2016 18:43
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 tsubaki/6d2a7e7b37bbba431158 to your computer and use it in GitHub Desktop.
Save tsubaki/6d2a7e7b37bbba431158 to your computer and use it in GitHub Desktop.
カスタムマテリアルエディタ用の。
Shader "ExampleShader" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Standard fullforwardshadows
#pragma target 3.0
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
};
fixed4 _Color;
void surf (Input IN, inout SurfaceOutputStandard o) {
fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
}
ENDCG
}
FallBack "Diffuse"
CustomEditor "ExampleShaderInspector"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment