This repository has been archived on 2024-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
snakeinabox/Assets/Materials/Unlit.shader
2020-07-09 11:41:01 -07:00

53 lines
No EOL
1 KiB
Text

Shader "Custom/Unlit"
{
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex VertexProgram
#pragma fragment FragmentProgram
#pragma multi_compile_instancing
#pragma target 3.5
// #include "UnityCG.cginc"
#include "UnityStandardBRDF.cginc"
struct VertexData
{
fixed4 position : POSITION;
// fixed3 normal : NORMAL;
UNITY_VERTEX_INPUT_INSTANCE_ID
fixed4 color : COLOR;
};
struct Interpolators
{
fixed4 position : SV_POSITION;
// fixed3 normal : TEXCOORD1;
fixed4 color : COLOR0;
// fixed attenuation : TEXCOORD2;
};
Interpolators VertexProgram (VertexData v)
{
Interpolators i;
UNITY_SETUP_INSTANCE_ID(v);
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
}
}
}