OldBlueWater/BlueWater/Assets/Spine/Runtime/spine-unity/Shaders/CGIncludes/Spine-Skeleton-Tint-Common.cginc
NTG_Lenovo 4a70315d56 Spine 런타임 에셋 추가
+ iDamageable 관통률 삭제
+ #44 스킬 시스템 구성 및 임시 스킬 FireBoom 작업
2023-11-01 16:39:12 +09:00

28 lines
780 B
HLSL

#ifndef SKELETON_TINT_COMMON_INCLUDED
#define SKELETON_TINT_COMMON_INCLUDED
float4 fragTintedColor(float4 texColor, float3 darkTintColor, float4 lightTintColorPMA, float lightColorAlpha, float darkColorAlpha) {
float a = texColor.a * lightTintColorPMA.a;
#if !defined(_STRAIGHT_ALPHA_INPUT)
float3 texDarkColor = (texColor.a - texColor.rgb);
#else
float3 texDarkColor = (1 - texColor.rgb);
#endif
float3 darkColor = texDarkColor * darkTintColor.rgb * lightColorAlpha;
float3 lightColor = texColor.rgb * lightTintColorPMA.rgb;
float4 fragColor = float4(darkColor + lightColor, a);
#if defined(_STRAIGHT_ALPHA_INPUT)
fragColor.rgb *= texColor.a;
#endif
#if defined(_DARK_COLOR_ALPHA_ADDITIVE)
fragColor.a = a * (1 - darkColorAlpha);
#endif
return fragColor;
}
#endif