forked from mirrors/principia
Assumedly abbreviation of "global illumination", some kind of alternative to the current way of drawing the shadows. Doesn't work very well when enabled, remove it.
23 lines
395 B
Text
23 lines
395 B
Text
attribute vec3 position;
|
|
attribute vec3 normal;
|
|
attribute vec3 color;
|
|
|
|
uniform mat4 MVP;
|
|
UNIFORMS
|
|
|
|
varying lowp float FS_diffuse;
|
|
varying lowp vec4 FS_color;
|
|
VARYINGS
|
|
|
|
void main(void)
|
|
{
|
|
vec3 nor = normal;
|
|
|
|
FS_color = vec4(color, 1.);
|
|
vec4 pos = MVP*vec4(position, 1.);
|
|
SET_SHADOW
|
|
SET_AMBIENT_OCCL
|
|
FS_diffuse = max(dot(LIGHT, nor)*_DIFFUSE, 0.);
|
|
gl_Position = pos;
|
|
}
|
|
|