Last active
April 1, 2016 17:38
-
-
Save prucha/e1bb13929cc518bcc4905f4ff142c249 to your computer and use it in GitHub Desktop.
Bare-bones Unity Shader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Milan/Fixed Unlit" | |
{ | |
Properties | |
{ | |
_Color("Main Color", Color) = (1,1,1,1) | |
} | |
SubShader | |
{ | |
Pass | |
{ | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
struct appdata | |
{ | |
float4 vertex : POSITION; | |
}; | |
struct v2f | |
{ | |
float4 pos : SV_POSITION; | |
}; | |
fixed4 _Color; | |
//Vertex Shader Function | |
v2f vert(appdata IN) | |
{ | |
v2f OUT; | |
OUT.pos = mul(UNITY_MATRIX_MVP, IN.vertex); | |
return OUT; | |
} | |
//Fragment Shader Function | |
fixed4 frag(v2f IN) : COLOR | |
{ | |
return _Color; //fixed4(1,1,0,1); | |
} | |
ENDCG | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment