1. Shader "WSP/FrameWork6"
    2. {
    3. Properties
    4. {
    5. //HDR颜色
    6. [HDR]_Color("颜色",Color) = (1,1,1,1)
    7. //[Toggle]开关
    8. [Toggle]_Int("整数",int) = 0.5
    9. //变化曲线值调节[Powerslider(value)]数值越大 影响曲线变化越大 会导致前面的滑条数值更容易调整 后段滑条数值缩小
    10. //[IntRange]可以使滑条范围数字变为整数调整,仅限滑条
    11. [IntRange]_Float("浮点数",Range(0,10)) = 1
    12. _Vector("四维向量",vector) = (0,0,0,1)
    13. }
    14. SubShader
    15. {
    16. pass
    17. {
    18. CGPROGRAM
    19. #pragma vertex vert
    20. #pragma fragment frag
    21. #include "UnityCG.cginc"
    22. struct appdata
    23. {
    24. float4 vertex:POSITION;
    25. };
    26. struct v2f
    27. {
    28. float4 pos:SV_POSITION;
    29. };
    30. fixed4 _Color;
    31. int _Int;
    32. float _Float;
    33. float4 _Vector;
    34. v2f vert(appdata v)
    35. {
    36. v2f o = (v2f)0;
    37. //o.pos= mul(UNITY_MATRIX_VP,mul(unity_ObjectToWorld,v.vertex));
    38. o.pos = UnityObjectToClipPos(v.vertex);
    39. return o;
    40. };
    41. float4 frag(v2f i):SV_TARGET
    42. {
    43. return _Vector;
    44. };
    45. ENDCG
    46. }
    47. }
    48. }