功能更新

This commit is contained in:
GG Z
2026-02-12 21:29:00 +08:00
parent a9faf251be
commit b3479d1f39
342 changed files with 4671 additions and 2223 deletions

View File

@@ -0,0 +1,20 @@
sampler2D inputTex : register(S0);
//范围-1~1
float brightness : register(C0);
//范围-1~1
float contrast : register(C1);
static const float PI = 3.14159265f;
float4 main(float2 uv : TEXCOORD) : COLOR
{
//UI的源颜色
float4 sourceColor = tex2D(inputTex, uv);
//计算对比度系数
float k = tan((45 + 44 * contrast) / 180 * PI);
//计算亮度对比度
float4 outColor = (sourceColor - 0.5 * (1 - brightness)) * k + 0.5 * (1 + brightness);
return outColor;
}