Created
December 14, 2016 06:13
-
-
Save kodai100/a4f75903452fdd589eb90b7b8ce34dae to your computer and use it in GitHub Desktop.
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 "Custom/SimpleTexture" { | |
Properties{ | |
_MainTex("Base(RGB)", 2D) = "white" {} | |
} | |
SubShader{ | |
LOD 200 | |
CGINCLUDE | |
#pragma target 5.0 | |
#include "UnityCG.cginc" | |
sampler2D _MainTex; | |
fixed _Size; | |
fixed4 _Color; | |
struct appdata { | |
float4 vertex : POSITION; | |
float2 uv : TEXCOORD0; | |
}; | |
struct v2f { | |
float4 pos : SV_POSITION; | |
float2 uv : TEXCOORD0; | |
}; | |
v2f vert(appdata IN) { | |
v2f OUT; | |
OUT.pos = mul(UNITY_MATRIX_MVP, IN.vertex); | |
OUT.uv = IN.uv; | |
return OUT; | |
} | |
ENDCG | |
Pass{ | |
Blend SrcAlpha OneMinusSrcAlpha | |
Cull Off | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
fixed4 frag(v2f IN) : SV_Target{ | |
return tex2D(_MainTex, IN.uv); | |
} | |
ENDCG | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment