18 lines
332 B
Text
18 lines
332 B
Text
![]() |
#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);
|
||
|
}
|