Reverse direction of sun vector, so object normals can be more normal.
This commit is contained in:
parent
273bd9bc6e
commit
91aef7cb1c
1 changed files with 7 additions and 2 deletions
|
@ -285,6 +285,8 @@ void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
|
||||||
t->sun_vec[0] = t->fg_sunpos.x - scenery_center.x;
|
t->sun_vec[0] = t->fg_sunpos.x - scenery_center.x;
|
||||||
t->sun_vec[1] = t->fg_sunpos.y - scenery_center.y;
|
t->sun_vec[1] = t->fg_sunpos.y - scenery_center.y;
|
||||||
t->sun_vec[2] = t->fg_sunpos.z - scenery_center.z;
|
t->sun_vec[2] = t->fg_sunpos.z - scenery_center.z;
|
||||||
|
MAT3_SCALE_VEC(t->sun_vec, t->sun_vec, -1.0);
|
||||||
|
|
||||||
/* make this a directional light source only */
|
/* make this a directional light source only */
|
||||||
t->sun_vec[3] = 0.0;
|
t->sun_vec[3] = 0.0;
|
||||||
|
|
||||||
|
@ -303,9 +305,12 @@ void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.11 1997/10/28 21:07:21 curt
|
/* Revision 1.12 1997/11/15 18:15:39 curt
|
||||||
/* Changed GLUT/ -> Main/
|
/* Reverse direction of sun vector, so object normals can be more normal.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.11 1997/10/28 21:07:21 curt
|
||||||
|
* Changed GLUT/ -> Main/
|
||||||
|
*
|
||||||
* Revision 1.10 1997/09/13 02:00:09 curt
|
* Revision 1.10 1997/09/13 02:00:09 curt
|
||||||
* Mostly working on stars and generating sidereal time for accurate star
|
* Mostly working on stars and generating sidereal time for accurate star
|
||||||
* placement.
|
* placement.
|
||||||
|
|
Loading…
Reference in a new issue