From e84d4d6a51cdf119569faf1b957a972b72afa78c Mon Sep 17 00:00:00 2001 From: hunterk Date: Tue, 6 Dec 2016 20:27:55 -0600 Subject: [PATCH] add intensity setting for ntsc-color --- misc/ntsc-colors.slang | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/ntsc-colors.slang b/misc/ntsc-colors.slang index 52975fc..a38d2da 100755 --- a/misc/ntsc-colors.slang +++ b/misc/ntsc-colors.slang @@ -6,8 +6,11 @@ layout(push_constant) uniform Push vec4 OriginalSize; vec4 OutputSize; uint FrameCount; + float intensity; } params; +#pragma parameter intensity "NTSC Intensity" 0.0 0.0 1.0 0.05 + layout(std140, set = 0, binding = 0) uniform UBO { mat4 MVP; @@ -34,6 +37,6 @@ layout(set = 0, binding = 2) uniform sampler2D Source; void main() { vec3 color = texture(Source, vTexCoord).rgb; - color = NTSCtoSRGB(color.rgb); + color = mix(NTSCtoSRGB(color.rgb), color.rgb, params.intensity); FragColor = vec4(color, 1.0); }