Shader "WSP/FrameWork6"
{
Properties
{
//HDR颜色
[HDR]_Color("颜色",Color) = (1,1,1,1)
//[Toggle]开关
[Toggle]_Int("整数",int) = 0.5
//变化曲线值调节[Powerslider(value)]数值越大 影响曲线变化越大 会导致前面的滑条数值更容易调整 后段滑条数值缩小
//[IntRange]可以使滑条范围数字变为整数调整,仅限滑条
[IntRange]_Float("浮点数",Range(0,10)) = 1
_Vector("四维向量",vector) = (0,0,0,1)
}
SubShader
{
pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex:POSITION;
};
struct v2f
{
float4 pos:SV_POSITION;
};
fixed4 _Color;
int _Int;
float _Float;
float4 _Vector;
v2f vert(appdata v)
{
v2f o = (v2f)0;
//o.pos= mul(UNITY_MATRIX_VP,mul(unity_ObjectToWorld,v.vertex));
o.pos = UnityObjectToClipPos(v.vertex);
return o;
};
float4 frag(v2f i):SV_TARGET
{
return _Vector;
};
ENDCG
}
}
}