From: ptitSeb Date: Sun, 22 Jun 2014 16:10:20 +0000 (+0200) Subject: GLES2RICE: Fix for shader not compiling X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74e43de0408bd2eb90725f09ecff26d81186c820;p=mupen64plus-pandora.git GLES2RICE: Fix for shader not compiling --- diff --git a/source/gles2rice/src/OGLES2FragmentShaders.cpp b/source/gles2rice/src/OGLES2FragmentShaders.cpp index d43fcae..b020d6d 100755 --- a/source/gles2rice/src/OGLES2FragmentShaders.cpp +++ b/source/gles2rice/src/OGLES2FragmentShaders.cpp @@ -37,6 +37,8 @@ const char *vertexShader = "attribute lowp vec2 aAtlasTransform; \n"\ "attribute mediump float aFogCoord; \n"\ " \n"\ +"uniform vec2 FogMinMax; \n"\ +" \n"\ "varying lowp float vFactor; \n"\ "varying lowp vec4 vShadeColor; \n"\ "varying mediump vec2 vTexCoord0; \n"\ @@ -49,8 +51,9 @@ const char *vertexShader = "vShadeColor = aColor; \n"\ "vTexCoord0 = aTexCoord0; \n"\ "vTexCoord1 = aTexCoord1; \n"\ -"vFog = clamp((FogMinMax[1] - aFogCoord)/(FogMinMax[1]-FogMinMax[0]),0.0,1.0); \n"\ +"vFog = (FogMinMax[1] - aFogCoord) / (FogMinMax[1] - FogMinMax[0]); \n"\ " \n"\ +"vFog = clamp(vFog, 0.0, 1.0); \n"\ "} \n"\ " \n";