diff options
Diffstat (limited to 'shaders/ntsc.fragment')
-rw-r--r-- | shaders/ntsc.fragment | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/shaders/ntsc.fragment b/shaders/ntsc.fragment index 12d6873..ceab64d 100644 --- a/shaders/ntsc.fragment +++ b/shaders/ntsc.fragment | |||
@@ -8,8 +8,8 @@ uniform sampler2D curFrameSampler; | |||
8 | uniform sampler2D NTSCArtifactSampler; | 8 | uniform sampler2D NTSCArtifactSampler; |
9 | uniform sampler2D prevFrameSampler; | 9 | uniform sampler2D prevFrameSampler; |
10 | 10 | ||
11 | const float Tuning_Sharp = 0.8; | 11 | const float Tuning_Sharp = 0.25; |
12 | const vec4 Tuning_Persistence = vec4(0.7,0.7,0.7,0.7); | 12 | const vec4 Tuning_Persistence = vec4(1.0) * 0.5; |
13 | const float Tuning_Bleed = 0.5; | 13 | const float Tuning_Bleed = 0.5; |
14 | const float Tuning_NTSC = 0.35; | 14 | const float Tuning_NTSC = 0.35; |
15 | uniform float NTSCLerp; | 15 | uniform float NTSCLerp; |
@@ -29,6 +29,7 @@ void main() | |||
29 | vec4 NTSCArtifact1 = texture(NTSCArtifactSampler, UV); | 29 | vec4 NTSCArtifact1 = texture(NTSCArtifactSampler, UV); |
30 | vec4 NTSCArtifact2 = texture(NTSCArtifactSampler, UV + RcpScrHeight); | 30 | vec4 NTSCArtifact2 = texture(NTSCArtifactSampler, UV + RcpScrHeight); |
31 | vec4 NTSCArtifact = mix(NTSCArtifact1, NTSCArtifact2, NTSCLerp); | 31 | vec4 NTSCArtifact = mix(NTSCArtifact1, NTSCArtifact2, NTSCLerp); |
32 | vec4 TunedNTSC = NTSCArtifact * Tuning_NTSC; | ||
32 | 33 | ||
33 | vec2 LeftUV = UV - RcpScrWidth; | 34 | vec2 LeftUV = UV - RcpScrWidth; |
34 | vec2 RightUV = UV + RcpScrWidth; | 35 | vec2 RightUV = UV + RcpScrWidth; |
@@ -41,7 +42,7 @@ void main() | |||
41 | vec4 Prev_Local = texture(prevFrameSampler, UV); | 42 | vec4 Prev_Local = texture(prevFrameSampler, UV); |
42 | vec4 Prev_Right = texture(prevFrameSampler, RightUV); | 43 | vec4 Prev_Right = texture(prevFrameSampler, RightUV); |
43 | 44 | ||
44 | Cur_Local = clamp(Cur_Local + (((Cur_Left - Cur_Local) + (Cur_Right - Cur_Local)) * Tuning_NTSC), vec4(0,0,0,0), vec4(1,1,1,1)); | 45 | Cur_Local = clamp(Cur_Local + (((Cur_Left - Cur_Local) + (Cur_Right - Cur_Local)) * TunedNTSC), vec4(0,0,0,0), vec4(1,1,1,1)); |
45 | 46 | ||
46 | float curBrt = Brightness(Cur_Local); | 47 | float curBrt = Brightness(Cur_Local); |
47 | float offset = 0; | 48 | float offset = 0; |