三国卡牌客户端基础资源仓库
hch
7 天以前 e35c8e096041b3cf97d91677bf8d6c4587223a9b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef BLENDMODES_NORMAL_PASS_INCLUDED
#define BLENDMODES_NORMAL_PASS_INCLUDED
 
#include "UnityCG.cginc"
#include "../CGIncludes/Spine-Common.cginc"
uniform sampler2D _MainTex;
uniform float4 _Color;
 
struct VertexInput {
    float4 vertex : POSITION;
    float2 uv : TEXCOORD0;
    float4 vertexColor : COLOR;
};
 
struct VertexOutput {
    float4 pos : SV_POSITION;
    float2 uv : TEXCOORD0;
    float4 vertexColor : COLOR;
};
 
VertexOutput vert(VertexInput v) {
    VertexOutput o;
    o.pos = UnityObjectToClipPos(v.vertex);
    o.uv = v.uv;
    o.vertexColor = PMAGammaToTargetSpace(v.vertexColor) * float4(_Color.rgb * _Color.a, _Color.a); // Combine a PMA version of _Color with vertexColor.
    return o;
}
 
float4 frag(VertexOutput i) : SV_Target{
    float4 texColor = tex2D(_MainTex, i.uv);
 
    #if defined(_STRAIGHT_ALPHA_INPUT)
    texColor.rgb *= texColor.a;
    #endif
 
    return (texColor * i.vertexColor);
}
 
#endif