From: Mikko Rasa Date: Tue, 7 Feb 2012 17:45:09 +0000 (+0000) Subject: Rename a variable in shader code to avoid conflict with a keyword X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=99c7813fbcd7c8d3a8f5ed44eff1578ad5dd7467;p=libs%2Fgl.git Rename a variable in shader code to avoid conflict with a keyword --- diff --git a/source/program.cpp b/source/program.cpp index 64aa7bc5..8511b8c1 100644 --- a/source/program.cpp +++ b/source/program.cpp @@ -61,8 +61,8 @@ const char *standard_fragment_src[] = "n", "\tvec3 n_normal = texture2D(normalmap, v_texcoord).xyz*2.0-1.0;\n", "l!n", "\tvec3 n_normal = normalize(v_normal);\n", "l", "\tfloat l_diffuse = max(dot(n_normal, normalize(v_light_dir)), 0.0);\n", - "p", "\tvec3 half = normalize(v_eye_dir+v_light_dir);\n", - "p", "\tfloat l_specular = pow(max(dot(half, n_normal), 0.0), gl_FrontMaterial.shininess);\n", + "p", "\tvec3 half_dir = normalize(v_eye_dir+v_light_dir);\n", + "p", "\tfloat l_specular = pow(max(dot(half_dir, n_normal), 0.0), gl_FrontMaterial.shininess);\n", "s", "\tfloat l_shadow = shadow2D(shadow, v_shadowcoord).r;\n", 0, "\tgl_FragColor = ", "!t!l!m", "vec4(1.0, 1.0, 1.0, 1.0)",