]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix GLSL shader compilation on GLES.
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 24 Sep 2015 19:14:47 +0000 (15:14 -0400)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 24 Sep 2015 19:14:47 +0000 (15:14 -0400)
shader_glsl.h

index 1f5803c07045bad0eff82940f5c90e9618add50e..ee9a35bec6766afa23df1c88d917eadfe63bc85b 100644 (file)
 "#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",