pixelgon/Assets/Materials/Shaders/CustomUnlit.shader
2020-06-05 11:54:36 -07:00

48 lines
No EOL
937 B
Text

Shader "Custom/Unlit"
{
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex VertexProgram
#pragma fragment FragmentProgram
// #include "UnityCG.cginc"
#include "UnityStandardBRDF.cginc"
struct VertexData
{
fixed4 position : POSITION;
// fixed3 normal : NORMAL;
fixed4 color : COLOR;
};
struct Interpolators
{
fixed4 position : SV_POSITION;
// fixed3 normal : TEXCOORD1;
fixed4 color : COLOR0;
// fixed attenuation : TEXCOORD2;
};
Interpolators VertexProgram (VertexData v)
{
Interpolators i;
i.position = UnityObjectToClipPos(v.position);
// i.normal = UnityObjectToWorldNormal(v.normal);
i.color = v.color;
return i;
}
fixed4 FragmentProgram (Interpolators i) : SV_TARGET
{
return i.color;
}
ENDCG
}
}
}