From 314bb2130d980aa987b138864770ab25b5965a0c Mon Sep 17 00:00:00 2001 From: rogerman Date: Wed, 22 Jun 2016 17:11:54 +0000 Subject: [PATCH] OpenGL Renderer: - Revert a change in setting the fog render bit for translucent fragments. Fixes the appearance of the Air Robo GP in Solatorobo: Red the Hunter. (Regression from r5464.) --- desmume/src/OGLRender.cpp | 2 +- desmume/src/OGLRender_3_2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index 91cf42957..f87f25a02 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -369,7 +369,7 @@ static const char *fragmentShader_100 = {"\ gl_FragData[0] = newFragColor;\n\ gl_FragData[1] = vec4( packVec3FromFloat(newFragDepth), float(polyEnableDepthWrite && (newFragColor.a > 0.999 || polySetNewDepthForTranslucent)));\n\ gl_FragData[2] = vec4(float(polyID)/63.0, 0.0, 0.0, float(newFragColor.a > 0.999));\n\ - gl_FragData[3] = vec4(float(polyEnableFog), 0.0, 0.0, float((newFragColor.a > 0.999) ? 1.0 : 0.0));\n\ + gl_FragData[3] = vec4(float(polyEnableFog), 0.0, 0.0, float((newFragColor.a > 0.999) ? 1.0 : 0.5));\n\ gl_FragDepth = newFragDepth;\n\ } \n\ "}; diff --git a/desmume/src/OGLRender_3_2.cpp b/desmume/src/OGLRender_3_2.cpp index 730e0d8a0..163a7cf04 100644 --- a/desmume/src/OGLRender_3_2.cpp +++ b/desmume/src/OGLRender_3_2.cpp @@ -251,7 +251,7 @@ static const char *GeometryFragShader_150 = {"\ outFragColor = newFragColor;\n\ outFragDepth = vec4( packVec3FromFloat(newFragDepth), float(bool(polyEnableDepthWrite) && (newFragColor.a > 0.999 || bool(polySetNewDepthForTranslucent))));\n\ outPolyID = vec4(float(polyID)/63.0, 0.0, 0.0, float(newFragColor.a > 0.999));\n\ - outFogAttributes = vec4(float(polyEnableFog), 0.0, 0.0, float((newFragColor.a > 0.999) ? 1.0 : 0.0));\n\ + outFogAttributes = vec4(float(polyEnableFog), 0.0, 0.0, float((newFragColor.a > 0.999) ? 1.0 : 0.5));\n\ gl_FragDepth = newFragDepth;\n\ } \n\ "};