From 4fa3dbefa4624617ba80b82187ea4a7c7831b124 Mon Sep 17 00:00:00 2001 From: Monroe88 Date: Tue, 2 May 2017 22:24:21 -0500 Subject: [PATCH] (nes-color-decoder) Use correct level when color is 0xE and 0xF --- misc/nes-color-decoder-alt.slang | 3 +++ misc/nes-color-decoder-sony.slang | 3 +++ misc/nes-color-decoder.slang | 3 +++ 3 files changed, 9 insertions(+) diff --git a/misc/nes-color-decoder-alt.slang b/misc/nes-color-decoder-alt.slang index 01c1ab6..fe182fd 100644 --- a/misc/nes-color-decoder-alt.slang +++ b/misc/nes-color-decoder-alt.slang @@ -58,6 +58,9 @@ vec3 MakeRGBColor(int emphasis, int level, int color) float g = 0.0; float b = 0.0; + // Color 0xE and 0xF are black + level = (color < 14) ? level : 1; + // Voltage levels, relative to synch voltage float black = 0.518; float white = 1.962; diff --git a/misc/nes-color-decoder-sony.slang b/misc/nes-color-decoder-sony.slang index 6b1d404..e121e70 100644 --- a/misc/nes-color-decoder-sony.slang +++ b/misc/nes-color-decoder-sony.slang @@ -58,6 +58,9 @@ vec3 MakeRGBColor(int emphasis, int level, int color) float g = 0.0; float b = 0.0; + // Color 0xE and 0xF are black + level = (color < 14) ? level : 1; + // Voltage levels, relative to synch voltage float black = 0.518; float white = 1.962; diff --git a/misc/nes-color-decoder.slang b/misc/nes-color-decoder.slang index 6e3ae4f..1e61963 100644 --- a/misc/nes-color-decoder.slang +++ b/misc/nes-color-decoder.slang @@ -58,6 +58,9 @@ vec3 MakeRGBColor(int emphasis, int level, int color) float g = 0.0; float b = 0.0; + // Color 0xE and 0xF are black + level = (color < 14) ? level : 1; + // Voltage levels, relative to synch voltage float black = 0.518; float white = 1.962;