summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2013-11-25 01:30:53 +1300
committerScott Mansell <phiren@gmail.com>2013-11-25 01:30:53 +1300
commit12741f6406899f7e184cd2139c83e215c43a90f8 (patch)
tree80b0ea6233cb97424e9ab752e49361bf240677e2 /Source/Core/VideoBackends
parentb5bd2ba847562d1cc7494941899e3acf4d7e007b (diff)
Add comments for anybody attempting accuracy improvements in the future.
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/OGL/Src/TextureConverter.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/OGL/Src/TextureConverter.cpp b/Source/Core/VideoBackends/OGL/Src/TextureConverter.cpp
index 71ad6f4223..b51672b763 100644
--- a/Source/Core/VideoBackends/OGL/Src/TextureConverter.cpp
+++ b/Source/Core/VideoBackends/OGL/Src/TextureConverter.cpp
@@ -62,6 +62,22 @@ static const char *VProgram =
void CreatePrograms()
{
+ /* TODO: Accuracy Improvements
+ *
+ * This shader doesn't really match what the gamecube does interally in the
+ * copy pipeline.
+ * 1. It uses Opengl's built in filtering when yscaling, someone could work
+ * out how the copypipeline does it's filtering and implement it correctly
+ * in this shader.
+ * 2. Deflickering isn't implemented, a futher filtering over 3 lines.
+ * Isn't really needed on non-interlaced monitors (and would lower quality;
+ * But hey, accuracy!)
+ * 3. Flipper's YUYV conversion implements a 3 pixel horozontal blur on the
+ * UV channels, centering the U channel on the Left pixel and the V channel
+ * on the Right pixel.
+ * The current implementation Centers both UV channels at the same place
+ * inbetween the two Pixels, and only blurs over these two pixels.
+ */
// Output is BGRA because that is slightly faster than RGBA.
const char *FProgramRgbToYuyv =
"uniform sampler2DRect samp9;\n"
@@ -79,6 +95,13 @@ void CreatePrograms()
" ocol0 = vec4(dot(c1,y_const),dot(c01,u_const),dot(c0,y_const),dot(c01, v_const)) + const3;\n"
"}\n";
+ /* TODO: Accuracy Improvements
+ *
+ * The YVYU to RGB conversion here matches the RGB to YUYV done above, but
+ * if a game modifies or adds images to the XFB then it should be using the
+ * same algorithm as the flipper, and could result in slight colour inaccuracies
+ * when run back through this shader.
+ */
const char *FProgramYuyvToRgb =
"uniform sampler2DRect samp9;\n"
"VARYIN vec2 uv0;\n"