- 0, "\tgl_FragColor = ",
- "!t!l!m", "vec4(1.0, 1.0, 1.0, 1.0)",
- "t", "texture2D(texture, v_texcoord)",
+ /* XXX This is incorrect with normal mapping, since the vectors are in TBN
+ space but environment map is expected to be in eye space */
+ "e", "\tvec4 reflection = textureCube(environment, n_normal*(dot(n_normal, v_eye_dir)*2.0)-v_eye_dir);\n",
+ "t", "\tvec4 tex_sample = texture2D(texture, v_texcoord);\n",
+ 0, "\tgl_FragColor.rgb = ",
+ "!t!l!m", "vec3(1.0)",
+ "t", "tex_sample.rgb",