Qt: Fix builtin post shaders

This commit is contained in:
Connor McLaughlin
2022-07-23 18:49:18 +10:00
parent 322c0c4c74
commit e84f38f466
9 changed files with 158 additions and 159 deletions

View File

@ -0,0 +1,33 @@
/*
[configuration]
[OptionRangeFloat]
GUIName = Gamma In
OptionName = GAMMA_IN
MinValue = 0.1
MaxValue = 10.0
StepAmount = 0.1
DefaultValue = 2.2
[OptionRangeFloat]
GUIName = Gamma Out
OptionName = GAMMA_OUT
MinValue = 0.1
MaxValue = 10.0
StepAmount = 0.1
DefaultValue = 2.2
[/configuration]
*/
void main()
{
float4 color = Sample();
float gamma_in = GetOption(GAMMA_IN);
float gamma_out = 1.0f / GetOption(GAMMA_OUT);
color.rgb = pow(color.rgb, float3(gamma_in, gamma_in, gamma_in));
color.rgb = pow(color.rgb, float3(gamma_out, gamma_out, gamma_out));
SetOutput(saturate(color));
}