]> git.mxchange.org Git - flightgear.git/commitdiff
Reverse direction of sun vector, so object normals can be more normal.
authorcurt <curt>
Sat, 15 Nov 1997 18:15:39 +0000 (18:15 +0000)
committercurt <curt>
Sat, 15 Nov 1997 18:15:39 +0000 (18:15 +0000)
Time/sunpos.c

index 25cfc09812f4a441c14a195d4fd20369bd9f07fb..93c3f9ea0296ef5b9930341f161d06a66ee574a6 100644 (file)
@@ -285,6 +285,8 @@ void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
     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[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 */
     t->sun_vec[3] = 0.0;
 
@@ -303,9 +305,12 @@ void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
 
 
 /* $Log$
-/* Revision 1.11  1997/10/28 21:07:21  curt
-/* Changed GLUT/ -> Main/
+/* Revision 1.12  1997/11/15 18:15:39  curt
+/* 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
  * Mostly working on stars and generating sidereal time for accurate star
  * placement.