Skip to content

Commit

Permalink
ntsc-simple, fix ms/md256 mode hue, tidy parameters (#488)
Browse files Browse the repository at this point in the history
* Update ntsc-simple-1.glsl

* Update ntsc-simple-2.glsl
  • Loading branch information
metallic77 authored Aug 22, 2024
1 parent 24646bf commit 2840f64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ntsc/shaders/ntsc-simple/ntsc-simple-1.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ void main()
if (system_choose == 1.0) {v_phase_alt =0.0; timer = 0.0; hue_u = -3.0; hue_v = -3.0;}
// pce alternates every two lines
if (system_choose == 2.0) {v_phase_alt = 1.0; timer = 0.0;}
if (system_choose == 3.0) {v_phase_alt = 0.0; timer = 0.0;}
if (system_choose == 3.0) {hue_u = 1.0; hue_v = 0.8; v_phase_alt = 0.0; timer = 0.0;}
float altv = 0.0;
if (system_choose == 4.0) {v_phase_alt = 0.0; timer = 0.0;hue_u = 1.8;
hue_v = 1.8; altv = mod(floor(vTexCoord.y * SourceSize.y + 0.5), 2.0) * pi;}
if (system_choose == 5.0) {v_phase_alt = 0.0; timer = 0.0;hue_u = -3.2;
hue_v = -3.0; altv = mod(floor(vTexCoord.y * SourceSize.y + 0.5), 2.0) * pi;}
if (system_choose == 6.0) {hue_u = -1.4;hue_v = -1.3;v_phase_alt = 1.0; timer = 0.0;}

if (anim_overr == 1.0) timer = mod(float(FrameCount),2.0);
if (anim_overr == 1.0) timer = mod(float(FrameCount/2),2.0);
vec3 res = COMPAT_TEXTURE(Source, vTexCoord).rgb*rgb2yuv;

float phase = vTexCoord.x*SourceSize.x*pi*phase_alt- vTexCoord.y*SourceSize.y*pi*v_phase_alt + timer*pi*phase_alt +altv ;
Expand Down
6 changes: 3 additions & 3 deletions ntsc/shaders/ntsc-simple/ntsc-simple-2.glsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if defined(VERTEX)

#pragma parameter bogus "0:nes/snes 1:md 2:pce 3:ms/md256 4:ZXSp 5:c64 6:a2600" 0.0 0.0 0.0 0.0
#pragma parameter system_choose "System choose" 0.0 0.0 6.0 1.0
#pragma parameter system_choose "SYSTEM CHOOSE" 0.0 0.0 6.0 1.0
#pragma parameter bogus "[ 0:NINTENDO 1:GEN 2:PCE 3:MS-MD256 4:ZXSp 5:C=64 6:A26]" 0.0 0.0 1.0 1.0
#pragma parameter steps "Filter Size (faster)" 4.0 1.0 16.0 1.0
#pragma parameter ntsc_sharp "NTSC Sharpness" 0.1 0.0 1.0 0.01
#pragma parameter ntsc_sat "NTSC Saturation" 2.0 0.0 4.0 0.05
Expand Down Expand Up @@ -130,7 +130,7 @@ void main()
altv = mod(floor(vTexCoord.y * SourceSize.y + 0.5), 2.0) * pi;}
if (system_choose == 6.0) {v_phase_alt = 0.0; timer = 0.0; }

if (anim_overr == 1.0) timer = mod(float(FrameCount),2.0);
if (anim_overr == 1.0) timer = mod(float(FrameCount/2),2.0);

vec3 res = vec3(0.0);
float sum = 0.0;
Expand Down

0 comments on commit 2840f64

Please sign in to comment.