aboutsummaryrefslogtreecommitdiff
path: root/shaders/moon.fp
blob: 18242d221de4bc8ec6eb7c1722a2d252110ebdd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
uniform sampler2D tex;

varying vec3 fragmentNormal ;
varying vec3 lightVector ;

void main() {
	float f = dot( normalize( fragmentNormal ), normalize( lightVector ) );
	vec4 color = texture2D( tex, gl_TexCoord[0].xy );

	f = ( 1.0f / (1.0f + exp( -f * 150.0f ) ) ) ;

	gl_FragColor = f * color;
}