19 lines
426 B
GLSL
19 lines
426 B
GLSL
|
// -*-C++-*-
|
||
|
|
||
|
// Shader that uses OpenGL state values to do per-pixel lighting
|
||
|
//
|
||
|
// The only light used is gl_LightSource[0], which is assumed to be
|
||
|
// directional.
|
||
|
//
|
||
|
// Diffuse colors come from the gl_Color, ambient from the material. This is
|
||
|
// equivalent to osg::Material::DIFFUSE.
|
||
|
#version 120
|
||
|
#define MODE_OFF 0
|
||
|
#define MODE_DIFFUSE 1
|
||
|
#define MODE_AMBIENT_AND_DIFFUSE 2
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
gl_Position = ftransform();
|
||
|
}
|