This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
csce441pine64backup/L00/resources/simple_frag.glsl
2017-02-17 17:32:44 -06:00

11 lines
210 B
GLSL

#version 120
varying vec3 vNor;
void main()
{
vec3 normal = normalize(vNor);
// Map normal in the range [-1, 1] to color in range [0, 1];
vec3 color = 0.5*normal + 0.5;
gl_FragColor = vec4(color, 1.0);
}