At a basic level, a projective light performs the same operations that occur when an ordinary 3D position is projected onto the screen during rendering. During normal rendering, a point
p given in
world space is transformed to
eye space given the current camera's
view matrix, and is then transformed to
clip space using the current camera's
projection matrix. During rendering of a scene lit by a projective light, a given point
q in the scene is transformed back to
world space given the current camera's
inverse view matrix, and is then transformed to
eye space from the point of view of the light (subsequently referred to as
light eye space) using the light's
view matrix. Finally,
q is transformed to
clip space from the point of view of the light (subsequently referred to as
light clip space) using the light's
projection matrix. It should be noted (in order to indicate that there is nothing unusual about the light's view or projection matrices) that if the camera and light have the same position, orientation, scale, and projection, then the resulting transformed values of
q and
p are identical. The resulting transformed value of
q is mapped from the range
[(-1, -1, -1), (1, 1, 1)] to
[(0, 0, 0), (1, 1, 1)], and the resulting coordinates are used to retrieve a texel from the 2D texture associated with the light.