53 lines
No EOL
1 KiB
Text
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
|
|
}
|
|
}
|
|
} |