}
#pragma MSP stage(fragment)
-vec3 get_normal_sample()
+vec3 get_fragment_normal()
{
if(use_normal_map)
- return texture(normal_map, texcoord.xy).xyz*2.0-1.0;
+ return normalize(texture(normal_map, texcoord.xy).xyz*2.0-1.0);
else
return vec3(0.0, 0.0, 1.0);
}
vec4 get_environment_sample(vec3 direction)
{
- return texture(environment, direction);
+ return texture(environment_map, direction);
}
vec3 get_reflection(vec3 normal, vec3 look)