diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index e0f55d2200..26fa6a8fe4 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -673,7 +673,12 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour // // First let's check we really have a channel shuffle effect if (m_channel_shuffle) { - if (m_context->CLAMP.WMS == 3 && ((m_context->CLAMP.MAXU & 0x8) == 8)) { + if (m_game.title == CRC::GT4 || m_game.title == CRC::GT3 || m_game.title == CRC::GTConcept) { + GL_INS("Gran Turismo RGB Channel"); + ps_sel.channel = 7; + m_context->TEX0.TFX = TFX_DECAL; + rt = tex->m_from_target; + } else if (m_context->CLAMP.WMS == 3 && ((m_context->CLAMP.MAXU & 0x8) == 8)) { // Read either blue or Alpha. Let's go for Blue ;) // MGS3/Kill Zone GL_INS("Blue channel"); diff --git a/plugins/GSdx/res/glsl/tfx_fs.glsl b/plugins/GSdx/res/glsl/tfx_fs.glsl index c6bb84933c..b3d211a2d1 100644 --- a/plugins/GSdx/res/glsl/tfx_fs.glsl +++ b/plugins/GSdx/res/glsl/tfx_fs.glsl @@ -331,6 +331,13 @@ vec4 fetch_alpha() return sample_p(rt.a) * 255.0f; } +vec4 fetch_rgb() +{ + vec4 rt = fetch_raw_color(); + vec4 c = vec4(sample_p(rt.r).r, sample_p(rt.g).g, sample_p(rt.b).b, 1.0f); + return c * 255.0f; +} + ////////////////////////////////////////////////////////////////////// vec4 sample_color(vec2 st) @@ -500,6 +507,8 @@ vec4 ps_color() vec4 T = fetch_blue(); #elif PS_CHANNEL_FETCH == 4 vec4 T = fetch_alpha(); +#elif PS_CHANNEL_FETCH == 7 + vec4 T = fetch_rgb(); #elif PS_DEPTH_FMT > 0 // Integral coordinate vec4 T = sample_depth(PSin.t_int.zw); diff --git a/plugins/GSdx/res/glsl_source.h b/plugins/GSdx/res/glsl_source.h index 9466f6f2a1..24737cc4b4 100644 --- a/plugins/GSdx/res/glsl_source.h +++ b/plugins/GSdx/res/glsl_source.h @@ -1175,6 +1175,13 @@ static const char* const tfx_fs_all_glsl = " return sample_p(rt.a) * 255.0f;\n" "}\n" "\n" + "vec4 fetch_rgb()\n" + "{\n" + " vec4 rt = fetch_raw_color();\n" + " vec4 c = vec4(sample_p(rt.r).r, sample_p(rt.g).g, sample_p(rt.b).b, 1.0f);\n" + " return c * 255.0f;\n" + "}\n" + "\n" "//////////////////////////////////////////////////////////////////////\n" "\n" "vec4 sample_color(vec2 st)\n" @@ -1344,6 +1351,8 @@ static const char* const tfx_fs_all_glsl = " vec4 T = fetch_blue();\n" "#elif PS_CHANNEL_FETCH == 4\n" " vec4 T = fetch_alpha();\n" + "#elif PS_CHANNEL_FETCH == 7\n" + " vec4 T = fetch_rgb();\n" "#elif PS_DEPTH_FMT > 0\n" " // Integral coordinate\n" " vec4 T = sample_depth(PSin.t_int.zw);\n"