mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 01:11:32 +11:00
add intensity setting for ntsc-color
This commit is contained in:
parent
9ee5eb1eb4
commit
e84d4d6a51
|
@ -6,8 +6,11 @@ layout(push_constant) uniform Push
|
||||||
vec4 OriginalSize;
|
vec4 OriginalSize;
|
||||||
vec4 OutputSize;
|
vec4 OutputSize;
|
||||||
uint FrameCount;
|
uint FrameCount;
|
||||||
|
float intensity;
|
||||||
} params;
|
} params;
|
||||||
|
|
||||||
|
#pragma parameter intensity "NTSC Intensity" 0.0 0.0 1.0 0.05
|
||||||
|
|
||||||
layout(std140, set = 0, binding = 0) uniform UBO
|
layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
{
|
{
|
||||||
mat4 MVP;
|
mat4 MVP;
|
||||||
|
@ -34,6 +37,6 @@ layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 color = texture(Source, vTexCoord).rgb;
|
vec3 color = texture(Source, vTexCoord).rgb;
|
||||||
color = NTSCtoSRGB(color.rgb);
|
color = mix(NTSCtoSRGB(color.rgb), color.rgb, params.intensity);
|
||||||
FragColor = vec4(color, 1.0);
|
FragColor = vec4(color, 1.0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue