diff --git a/plugins/GSdx/res/glsl/convert.glsl b/plugins/GSdx/res/glsl/convert.glsl index 18bd32aee..afa59e881 100644 --- a/plugins/GSdx/res/glsl/convert.glsl +++ b/plugins/GSdx/res/glsl/convert.glsl @@ -178,7 +178,7 @@ void ps_main13() { // Convert a RRGBA texture into a float depth texture // FIXME: I'm afraid of the accuracy - const vec4 bitSh = vec4(exp2(-32.0f), exp2(-24.0f), exp2(-16.0f), exp(-8.0f)) * vec4(255.0); + const vec4 bitSh = vec4(exp2(-32.0f), exp2(-24.0f), exp2(-16.0f), exp2(-8.0f)) * vec4(255.0); gl_FragDepth = dot(sample_c(), bitSh); } #endif @@ -212,7 +212,7 @@ void ps_main16() { // Convert a RGB5A1 (saved as RGBA8) color to a 16 bit Z // FIXME: I'm afraid of the accuracy - const vec4 bitSh = vec4(exp2(-32.0f), exp2(-27.0f), exp2(-22.0f), exp(-17.0f)); + const vec4 bitSh = vec4(exp2(-32.0f), exp2(-27.0f), exp2(-22.0f), exp2(-17.0f)); // Trunc color to drop useless lsb vec4 color = trunc(sample_c() * vec4(255.0f) / vec4(8.0f, 8.0f, 8.0f, 128.0f)); gl_FragDepth = dot(vec4(color), bitSh); diff --git a/plugins/GSdx/res/glsl_source.h b/plugins/GSdx/res/glsl_source.h index c2dc7af8d..18781b2b7 100644 --- a/plugins/GSdx/res/glsl_source.h +++ b/plugins/GSdx/res/glsl_source.h @@ -203,7 +203,7 @@ static const char* convert_glsl = "{\n" " // Convert a RRGBA texture into a float depth texture\n" " // FIXME: I'm afraid of the accuracy\n" - " const vec4 bitSh = vec4(exp2(-32.0f), exp2(-24.0f), exp2(-16.0f), exp(-8.0f)) * vec4(255.0);\n" + " const vec4 bitSh = vec4(exp2(-32.0f), exp2(-24.0f), exp2(-16.0f), exp2(-8.0f)) * vec4(255.0);\n" " gl_FragDepth = dot(sample_c(), bitSh);\n" "}\n" "#endif\n" @@ -237,7 +237,7 @@ static const char* convert_glsl = "{\n" " // Convert a RGB5A1 (saved as RGBA8) color to a 16 bit Z\n" " // FIXME: I'm afraid of the accuracy\n" - " const vec4 bitSh = vec4(exp2(-32.0f), exp2(-27.0f), exp2(-22.0f), exp(-17.0f));\n" + " const vec4 bitSh = vec4(exp2(-32.0f), exp2(-27.0f), exp2(-22.0f), exp2(-17.0f));\n" " // Trunc color to drop useless lsb\n" " vec4 color = trunc(sample_c() * vec4(255.0f) / vec4(8.0f, 8.0f, 8.0f, 128.0f));\n" " gl_FragDepth = dot(vec4(color), bitSh);\n" diff --git a/plugins/GSdx_legacy/res/glsl/convert.glsl b/plugins/GSdx_legacy/res/glsl/convert.glsl index 18bd32aee..afa59e881 100644 --- a/plugins/GSdx_legacy/res/glsl/convert.glsl +++ b/plugins/GSdx_legacy/res/glsl/convert.glsl @@ -178,7 +178,7 @@ void ps_main13() { // Convert a RRGBA texture into a float depth texture // FIXME: I'm afraid of the accuracy - const vec4 bitSh = vec4(exp2(-32.0f), exp2(-24.0f), exp2(-16.0f), exp(-8.0f)) * vec4(255.0); + const vec4 bitSh = vec4(exp2(-32.0f), exp2(-24.0f), exp2(-16.0f), exp2(-8.0f)) * vec4(255.0); gl_FragDepth = dot(sample_c(), bitSh); } #endif @@ -212,7 +212,7 @@ void ps_main16() { // Convert a RGB5A1 (saved as RGBA8) color to a 16 bit Z // FIXME: I'm afraid of the accuracy - const vec4 bitSh = vec4(exp2(-32.0f), exp2(-27.0f), exp2(-22.0f), exp(-17.0f)); + const vec4 bitSh = vec4(exp2(-32.0f), exp2(-27.0f), exp2(-22.0f), exp2(-17.0f)); // Trunc color to drop useless lsb vec4 color = trunc(sample_c() * vec4(255.0f) / vec4(8.0f, 8.0f, 8.0f, 128.0f)); gl_FragDepth = dot(vec4(color), bitSh); diff --git a/plugins/GSdx_legacy/res/glsl_source.h b/plugins/GSdx_legacy/res/glsl_source.h index 2c86638ff..f2fc92f1b 100644 --- a/plugins/GSdx_legacy/res/glsl_source.h +++ b/plugins/GSdx_legacy/res/glsl_source.h @@ -203,7 +203,7 @@ static const char* convert_glsl = "{\n" " // Convert a RRGBA texture into a float depth texture\n" " // FIXME: I'm afraid of the accuracy\n" - " const vec4 bitSh = vec4(exp2(-32.0f), exp2(-24.0f), exp2(-16.0f), exp(-8.0f)) * vec4(255.0);\n" + " const vec4 bitSh = vec4(exp2(-32.0f), exp2(-24.0f), exp2(-16.0f), exp2(-8.0f)) * vec4(255.0);\n" " gl_FragDepth = dot(sample_c(), bitSh);\n" "}\n" "#endif\n" @@ -237,7 +237,7 @@ static const char* convert_glsl = "{\n" " // Convert a RGB5A1 (saved as RGBA8) color to a 16 bit Z\n" " // FIXME: I'm afraid of the accuracy\n" - " const vec4 bitSh = vec4(exp2(-32.0f), exp2(-27.0f), exp2(-22.0f), exp(-17.0f));\n" + " const vec4 bitSh = vec4(exp2(-32.0f), exp2(-27.0f), exp2(-22.0f), exp2(-17.0f));\n" " // Trunc color to drop useless lsb\n" " vec4 color = trunc(sample_c() * vec4(255.0f) / vec4(8.0f, 8.0f, 8.0f, 128.0f));\n" " gl_FragDepth = dot(vec4(color), bitSh);\n"