From 7a8d1008615871b3b3ab2accdf832b8b64150421 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 24 Apr 2016 22:02:00 -0400 Subject: [PATCH] Found a new working formula for NTSC Atari 2600 colours. --- Machines/Atari2600/Atari2600.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Machines/Atari2600/Atari2600.cpp b/Machines/Atari2600/Atari2600.cpp index 461f3ac02..f7dfe2dff 100644 --- a/Machines/Atari2600/Atari2600.cpp +++ b/Machines/Atari2600/Atari2600.cpp @@ -35,9 +35,9 @@ void Machine::setup_output(float aspect_ratio) "float composite_sample(usampler2D texID, vec2 coordinate, vec2 iCoordinate, float phase, float amplitude)\n" "{\n" "vec2 c = vec2(texture(texID, coordinate).rg) / vec2(255.0);" - "float y = 0.1 + c.x * 0.91071428571429;\n" - "float aOffset = 6.283185308 * (c.y - 3.0 / 16.0) * 1.14285714285714;\n" - "return y + step(0.03125, c.y) * 0.1 * cos(phase - aOffset);\n" + "float y = 0.1 + c.x * 0.91071428571429;" + "float aOffset = 6.283185308 * (2.0/16.0 - c.y);" // - 3.0 / 16.0 + "return y + step(0.03125, c.y) * 0.1 * cos(phase - aOffset);" "}"); _crt->set_output_device(Outputs::CRT::Television); }