From: Rudolf Polzer Date: Thu, 24 Sep 2015 19:14:47 +0000 (-0400) Subject: Fix GLSL shader compilation on GLES. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8f7a4422103541abd112bed9c3fbbbca193bffc4;p=xonotic%2Fdarkplaces.git Fix GLSL shader compilation on GLES. --- diff --git a/shader_glsl.h b/shader_glsl.h index 1f5803c0..ee9a35be 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -1499,9 +1499,9 @@ "#endif\n", "\n", "#ifdef USEREFLECTCUBE\n", -" vec3 TangentReflectVector = reflect(-EyeVectorFogDepth.xyz, surfacenormal);\n", -" vec3 ModelReflectVector = TangentReflectVector.x * VectorS.xyz + TangentReflectVector.y * VectorT.xyz + TangentReflectVector.z * VectorR.xyz;\n", -" vec3 ReflectCubeTexCoord = vec3(ModelToReflectCube * vec4(ModelReflectVector, 0));\n", +" myhalf3 TangentReflectVector = reflect(-EyeVectorFogDepth.xyz, surfacenormal);\n", +" myhalf3 ModelReflectVector = TangentReflectVector.x * VectorS.xyz + TangentReflectVector.y * VectorT.xyz + TangentReflectVector.z * VectorR.xyz;\n", +" myhalf3 ReflectCubeTexCoord = vec3(ModelToReflectCube * vec4(ModelReflectVector, 0));\n", " diffusetex += cast_myhalf3(offsetMappedTexture2D(Texture_ReflectMask)) * cast_myhalf3(dp_textureCube(Texture_ReflectCube, ReflectCubeTexCoord));\n", "#endif\n", "\n",