什么是应用亮度和对比度的简单像素着色器脚本效果?
我找到了这个,但它似乎不正确:
sampler2D input : register(s0);
float brightness : register(c0);
float contrast : register(c1);
float4 main(float2 uv : TEXCOORD) : COLOR
{
float4 color = tex2D(input, uv);
float4 result = color;
result = color + brightness;
result = result * (1.0+contrast)/1.0;
return result;
}
谢谢!