mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-29 10:51:30 +11:00
Merge pull request #330 from MajorPainTheCactus/megatron_4_4
V4.4 Sony Megatron Shader
This commit is contained in:
commit
f77f7b3e3c
|
@ -74,7 +74,8 @@ vec3 WhiteBalance(float temperature, vec3 colour)
|
|||
float r601ToLinear_1(const float channel)
|
||||
{
|
||||
//return (channel >= 0.081f) ? pow((channel + 0.099f) * (1.0f / 1.099f), (1.0f / 0.45f)) : channel * (1.0f / 4.5f);
|
||||
return (channel >= 0.081f) ? pow((channel + 0.099f) * (1.0f / 1.099f), HCRT_GAMMA_IN) : channel * (1.0f / 4.5f);
|
||||
//return (channel >= 0.081f) ? pow((channel + 0.099f) * (1.0f / 1.099f), HCRT_GAMMA_IN) : channel * (1.0f / 4.5f);
|
||||
return pow((channel + 0.099f) * (1.0f / 1.099f), HCRT_GAMMA_IN);
|
||||
}
|
||||
|
||||
vec3 r601ToLinear(const vec3 colour)
|
||||
|
@ -86,7 +87,8 @@ vec3 r601ToLinear(const vec3 colour)
|
|||
float r709ToLinear_1(const float channel)
|
||||
{
|
||||
//return (channel >= 0.081f) ? pow((channel + 0.099f) * (1.0f / 1.099f), (1.0f / 0.45f)) : channel * (1.0f / 4.5f);
|
||||
return (channel >= 0.081f) ? pow((channel + 0.099f) * (1.0f / 1.099f), HCRT_GAMMA_IN) : channel * (1.0f / 4.5f);
|
||||
//return (channel >= 0.081f) ? pow((channel + 0.099f) * (1.0f / 1.099f), HCRT_GAMMA_IN) : channel * (1.0f / 4.5f);
|
||||
return pow((channel + 0.099f) * (1.0f / 1.099f), HCRT_GAMMA_IN);
|
||||
}
|
||||
|
||||
vec3 r709ToLinear(const vec3 colour)
|
||||
|
|
|
@ -14,7 +14,8 @@ const mat3 kXYZ_to_DCIP3 = mat3 (
|
|||
|
||||
float LinearTosRGB_1(const float channel)
|
||||
{
|
||||
return (channel > 0.0031308f) ? (1.055f * pow(channel, 1.0f / HCRT_GAMMA_OUT)) - 0.055f : channel * 12.92f;
|
||||
//return (channel > 0.0031308f) ? (1.055f * pow(channel, 1.0f / HCRT_GAMMA_OUT)) - 0.055f : channel * 12.92f;
|
||||
return (1.055f * pow(channel, 1.0f / HCRT_GAMMA_OUT)) - 0.055f;
|
||||
}
|
||||
|
||||
vec3 LinearTosRGB(const vec3 colour)
|
||||
|
@ -24,7 +25,8 @@ vec3 LinearTosRGB(const vec3 colour)
|
|||
|
||||
float LinearTo709_1(const float channel)
|
||||
{
|
||||
return (channel >= 0.018f) ? pow(channel * 1.099f, 1.0f / (HCRT_GAMMA_OUT - 0.18f)) - 0.099f : channel * 4.5f; // Gamma: 2.4 - 0.18 = 2.22
|
||||
//return (channel >= 0.018f) ? pow(channel * 1.099f, 1.0f / (HCRT_GAMMA_OUT - 0.18f)) - 0.099f : channel * 4.5f; // Gamma: 2.4 - 0.18 = 2.22
|
||||
return pow(channel * 1.099f, 1.0f / (HCRT_GAMMA_OUT - 0.18f)) - 0.099f;
|
||||
}
|
||||
|
||||
vec3 LinearTo709(const vec3 colour)
|
||||
|
|
Loading…
Reference in a new issue