From bcdc6bc6a52c87c64c7c91aba434c3de8cbdf104 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sun, 28 Feb 2016 21:53:55 +0600 Subject: [PATCH] Correct mipmap shader. Fixed Tetrisphere blending or texture issue on Mr. Education'sphere #682 --- src/OGL3X/Shaders_ogl3x.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/OGL3X/Shaders_ogl3x.h b/src/OGL3X/Shaders_ogl3x.h index 9945d2dc..a26d9a84 100644 --- a/src/OGL3X/Shaders_ogl3x.h +++ b/src/OGL3X/Shaders_ogl3x.h @@ -336,7 +336,11 @@ AUXILIARY_SHADER_VERSION "mediump float mipmap(out lowp vec4 readtex0, out lowp vec4 readtex1) { \n" " readtex0 = texture(uTex0, vTexCoord0); \n" " readtex1 = textureLod(uTex1, vTexCoord1, 0.0); \n" -" if (uMaxTile == 0) return 1.0; \n" +" if (uMaxTile == 0) { \n" +" if (uEnableLod != 0 && (uTextureDetail & 2) == 0) \n" +" readtex1 = readtex0; \n" +" return 1.0; \n" +" } \n" " \n" " mediump float fMaxTile = float(uMaxTile); \n" #if 1