tags:

views:

190

answers:

1

Is it possible to shade the polygons so every polygon would be rendered with the same light angle, no matter which their position is relative to the light?

I need to move my sun light, but the map is exteremely large, and i dont want the light looks any different in any other location, should be symmetric everywhere.

+6  A: 

A Directional Light (versus Point or Spot) "casts rays" in parallel, effectively simulating a light source from an infinite distance.

To set this directional, you set the w component of the light's x,y,z,w position to 0.

GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 };

MarkPowell