" VectorT = vec4(Attrib_TexCoord2.xyz, EyePosition.y - Attrib_Position.y);\n"
" VectorR = vec4(Attrib_TexCoord3.xyz, EyePosition.z - Attrib_Position.z);\n"
"# else\n"
-" VectorS = Attrib_TexCoord1;\n"
-" VectorT = Attrib_TexCoord2;\n"
-" VectorR = Attrib_TexCoord3;\n"
+" VectorS = vec4(Attrib_TexCoord1, 0);\n"
+" VectorT = vec4(Attrib_TexCoord2, 0);\n"
+" VectorR = vec4(Attrib_TexCoord3, 0);\n"
"# endif\n"
"#else\n"
"# ifdef USEFOG\n"
"\n"
"#ifdef USEREFLECTCUBE\n"
" vec3 TangentReflectVector = reflect(-EyeVectorFogDepth.xyz, surfacenormal);\n"
-" vec3 ModelReflectVector = TangentReflectVector.x * VectorS + TangentReflectVector.y * VectorT + TangentReflectVector.z * VectorR;\n"
+" vec3 ModelReflectVector = TangentReflectVector.x * VectorS.xyz + TangentReflectVector.y * VectorT.xyz + TangentReflectVector.z * VectorR.xyz;\n"
" vec3 ReflectCubeTexCoord = vec3(ModelToReflectCube * vec4(ModelReflectVector, 0));\n"
" diffusetex += myhalf3(offsetMappedTexture2D(Texture_ReflectMask)) * myhalf3(textureCube(Texture_ReflectCube, ReflectCubeTexCoord));\n"
"#endif\n"