]> git.mxchange.org Git - flightgear.git/commit
Begin work on rendering runway lights using environment maps. The basics
authorcurt <curt>
Sun, 6 Oct 2002 03:53:19 +0000 (03:53 +0000)
committercurt <curt>
Sun, 6 Oct 2002 03:53:19 +0000 (03:53 +0000)
commitc162577340cbe2d3696bccd676acd5fe82218fe8
tree85ceca85174a7234afee550d55c1a32564134c47
parentf0b7744fd564a6935ca19a9a6746e21d311132e8
Begin work on rendering runway lights using environment maps.  The basics
are now working.  A runway light is defined by a point and a direction.  The
point and direction are combined with the local up vector to create a small
triangle orthogonal to the direction.  The two ficticous corners of the
triangle are given an alpha value of zero, the orignal corner is given an
alpha of one.  The triangle is drawn in glPolygonMode(GL_FRONT, GL_POINT)
mode which means only the corner points are drawn, and since two have alpha=0
only the original point is drawn.  This is a long way to go to draw a point,
but it ensures that the point is only visible within 90 degrees of the light
direction, behind the light it is not visible.  This is still a long way
to get to drawing a point, but we use an environement map, with the direction
vector as the normal to mimic a light that is brightest when viewed head
on and dimmest when viewed perpendicularly or disappears when viewed from
behind.

- warning, there is a bug in how the current runway light direction vector
  is calculated which will adversely effect runway lighting.  The airports
  should be regenerated in order to fix this problem.
13 files changed:
src/Main/main.cxx
src/Objects/Makefile.am
src/Objects/dir_lights.cxx [deleted file]
src/Objects/dir_lights.hxx [deleted file]
src/Objects/matlib.cxx
src/Objects/newmat.cxx
src/Objects/obj.cxx
src/Objects/pt_lights.cxx [new file with mode: 0644]
src/Objects/pt_lights.hxx [new file with mode: 0644]
src/Scenery/scenery.cxx
src/Scenery/scenery.hxx
src/Scenery/tileentry.cxx
src/Scenery/tilemgr.cxx