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/L08/resources/.frag.glsl
2017-02-28 17:06:15 -06:00

17 lines
332 B
GLSL

#version 120
uniform vec3 lightPos;
uniform vec3 ka;
uniform vec3 kd;
uniform vec3 ks;
uniform float s;
varying vec3 n; // passed from the vertex shader
varying vec3 p; // passed from the vertex shader
void main()
{
n = normalize(normal);
vec3 color = 0.5 * (n + 1.0);
gl_FragColor = vec4(color.r, color.g, color.b, 1.0);
}