Graphics Reference
In-Depth Information
Figure 4.25. The effect of re-projecting an already reflected image and using it as a
source for the current frame. This produces multiple reflections and just like in the real
world the reflections lose intensity the further in reflection depth it gets.
nous space. We just need to divide the result with the w component to finally
get the clip-space coordinate. Then we can just map it into screen space and
start reading from the previous frame color buffer and thereby have an infinite
number of reflection bounces. Figure 4.26 and Listing 4.9 show the concept of
un-projecting and re-projecting a pixel into the previous camera's pixel position.
Another benefit of using the previous frame is the fact that we are taking
the final lighting and all transparent object information into account as well as
the possibility of including post-processing effects that have been applied to the
image. If we would have used the current unfinished frame, we would lack all of
those nice additions—though not all post-process effects are interesting.
Previous
Camera
(Frame i-1)
Previous
Camera
(Frame i-1)
Previous
Camera
(Frame i-1)
uv i-1
2. Previous
ViewProjection
1. Current
ViewProjection -1
(uv i , z i )
(uv i , z i )
(uv i , z i )
Current
Camera
(Frame i)
Current
Camera
(Frame i)
Current
Camera
(Frame i)
1. Current
ViewProjection -1
P i
P i
Figure 4.26. Illustration of how a pixel in screen space is transformed into its old coordinate by re-
projection, which can be used to read from the previous color buffer.
 
Search WWH ::




Custom Search