Professional Documents
Culture Documents
Displacement Mapping On The GPU - State of The Art: László Szirmay-Kalos, Tamás Umenhoffer
Displacement Mapping On The GPU - State of The Art: László Szirmay-Kalos, Tamás Umenhoffer
Displacement Mapping On The GPU - State of The Art: László Szirmay-Kalos, Tamás Umenhoffer
1–24
Department of Control Engineering and Information Technology, Budapest University of Technology, Hungary
Email: szirmay@iit.bme.hu
Abstract
This paper reviews the latest developments of displacement mapping algorithms implemented on the vertex, geom-
etry, and fragment shaders of graphics cards. Displacement mapping algorithms are classified as per-vertex and
per-pixel methods. Per-pixel approaches are further categorized as safe algorithms that aim at correct solutions in
all cases, to unsafe techniques that may fail in extreme cases but are usually much faster than safe algorithms, and
to combined methods that exploit the robustness of safe and the speed of unsafe techniques. We discuss the possible
roles of vertex, geometry, and fragment shaders to implement these algorithms. Then the particular GPU based
bump, parallax, relief, sphere, horizon mapping, cone stepping, local ray tracing, pyramidal and view-dependent
displacement mapping methods, as well as their numerous variations are reviewed providing also implementation
details of the shader programs. We present these methods using uniform notations and also point out when dif-
ferent authors called similar concepts differently. In addition to basic displacement mapping, self-shadowing and
silhouette processing are also reviewed. Based on our experiences gained having re-implemented these methods,
their performance and quality are compared, and the advantages and disadvantages are fairly presented.
Keywords: Displacement mapping, Tangent space, Di- erties to the macrostructure model. This is done by modulat-
rect3D 9 and 10, HLSL, Silhouettes, Self shadowing, GPU ing the smooth macrostructure surface by a height map de-
scribing the difference between the macrostructure and the
mesostructure models (figure 1).
ACM CCS: I.3.7 Three-Dimensional Graphics and Realism
= +
1. Introduction macrostructure surface
height map stored
as a texture
mesostructure surface
Object geometry is usually defined on three scales, the
macrostructure level, the mesostructure level, and the Figure 1: The basic idea of displacement mapping
microstructure level. A geometric model refers to the
macrostructure level and is often specified as a set of polyg-
Displacement mapping algorithms take sample points
onal surfaces. The mesostructure level includes higher fre-
and displace them perpendicularly to the normal of the
quency geometric details that are relatively small but still
macrostructure surface with the distance obtained from the
visible such as bumps on a surface. The microstructure
height map. The sample points can be either the vertices
level involves surface microfacets that are visually indis-
of the original or tessellated mesh (per-vertex displacement
tinguishable by human eyes, and are modeled by BRDFs
mapping) or the points corresponding to the texel centers
[CT81, HTSG91, APS00, KSK01] and conventional tex-
(per-pixel displacement mapping). In case of per-vertex dis-
tures [BN76, Bli77, CG85, Hec86].
placement mapping the modified geometry goes through the
Displacement mapping [Coo84, CCC87] provides high rendering pipeline. However, in per-pixel displacement map-
frequency geometric detail by adding mesostructure prop- ping, surface details are added when color texturing takes
place. The idea of combining displacement mapping with the direction where the first texture coordinate u increases,
texture lookups was proposed by Patterson, who called his while binormal ~B is obtained as the vector pointing into the
method as inverse displacement mapping [PHL91]. direction where the second texture coordinate v increases. It
means that tangent ~T and binormal ~B correspond to texture
Inverse displacement mapping algorithms became popu-
space vectors [1, 0] and [0, 1], respectively. The plane of the
lar also in CPU implementations. CPU based approaches
triangle can be parameterized linearly, thus an arbitrary point
[Tai92, LP95] flattened the base surface by warping and
~p inside the triangle is the following function of the texture
casted a curved ray, which was intersected with the displace-
coordinates:
ment map as if it were a height field. More recent meth-
ods have explored direct ray tracing using techniques such ~p(u, v) = ~p0 + (u − u0 )~T + (v − v0 )~B. (2)
as affine arithmetic [HS98], sophisticated caching schemes
[PH96] and grid base intersections [SSS00]. Improvements We note that triangle meshes may also be regarded as the
of height field ray-tracing algorithms have also been pro- first-order (i.e. linear) approximation of the parametric equa-
posed by [CORLS96, HS04, LS95, Mus88]. Huamin Qu et tion of the mesostructure surface,~r(u, v). Computing the first
al. [QQZ∗ 03] proposed a hybrid approach, which has the terms of its Taylor’s series expansion, we get
features of both rasterization and ray tracing. ∂~r ∂~r
~r(u, v) ≈~r(u0 , v0 ) + (u − u0 )+ (v − v0 ) , (3)
On the GPU per-vertex displacement mapping can be im- ∂u ∂v
plemented by the vertex shader or by the geometry shader. where the derivatives are evaluated at u0 , v0 . Comparing this
Per-pixel displacement mapping, on the other hand, is ex- equation to equation 2 we can conclude that
ecuted by the fragment shader. During displacement map- ∂~r
ping, the perturbed normal vectors should also be computed ~r(u0 , v0 ) = ~p(u0 , v0 ) = ~p0 , ~T = , ~B = ∂~r . (4)
∂u ∂v
for illumination, and self-shadowing information is also of-
ten needed.
In this review both vertex shader and fragment shader ap- B N
[u0 , v0 ]
proaches are discussed and compared. Performance mea- p1
B
surements have been made on NVidia GeForce 6800 GT z
graphics cards. When we briefly address geometry shader p2
algorithms, an NVidia GeForce 8800 card is used for perfor- [u2 , v2]
[u1 , v1] p T
0
mance measurements. Shader code samples are in HLSL. y
T x
texture space modeling space
2. Theory of displacement mapping
Figure 2: Tangent space
Let us denote the mesostructure surface by the paramet-
ric form ~r(u, v), the macrostructure surface by ~p(u, v), the
unit normal of the macrostructure surface by ~N 0 (u, v), and Tangent and binormal vectors together with the normal of
the displacement by scalar function h(u, v) called the height the macrostructure triangle form a coordinate system that is
map. Vectors are defined by coordinates in 3D modeling attached to the macrostructure surface. This coordinate sys-
space. Parameters u, v are in the unit interval, and are also tem defines the tangent space [Kil00, Gat03] (figure 2). We
called texture coordinates, while the 2D parameter space note that other definitions of the binormal are also possible,
is often referred to as texture space. The height map is in which are discussed together with the advantages and disad-
fact a gray scale texture. Displacement mapping decomposes vantages at the end of this section.
the definition of the surface to the macrostructure geom- If the parametric equation of the mesostructure surface is
etry and to a height map describing the difference of the not known, then the texturing information of the triangles
mesostructure and macrostructure surfaces in the direction can be used [Gat03] to find the tangent and binormal vectors
of the macrostructure normal vector: of a triangle. Substituting triangle vertices ~p1 and ~p2 with
~r(u, v) = ~p(u, v) + ~N 0 (u, v)h(u, v). (1) their texture coordinates into equation 2 we obtain
~p1 − ~p0 = (u1 − u0 )~T + (v1 − v0 )~B,
Macrostructure surface ~p(u, v) is assumed to be a trian- ~p2 − ~p0 = (u2 − u0 )~T + (v2 − v0 )~B.
gle mesh. Let us examine a single triangle of the mesh de-
fined by vertices ~p0 ,~p1 ,~p2 in modeling space, which are This a linear system of equations for the unknown ~T and ~B
associated with texture coordinates [u0 , v0 ], [u1 , v1 ], [u2 , v2 ], vectors (in fact, there are three systems, one for each of the
respectively. In order to find a parametric equation for the x, y, and z coordinates of the vectors). Solving these systems,
plane of the triangle, we select two basis vectors in the plane we obtain
of the triangle, called tangent and binormal. One possibil-
~T = (v1 − v0 )(~p2 − ~p0 ) − (v2 − v0 )(~p1 − ~p0 ) ,
ity is to define tangent vector ~T as the vector pointing into (u2 − u0 )(v1 − v0 ) − (u1 − u0 )(v2 − v0 )
~B = (u1 − u0 )(~p2 − ~p0 ) − (u2 − u0 )(~p1 − ~p0 ) . (5) true in the general case. Consider, for example, a sheared
(u1 − u0 )(v2 − v0 ) − (u2 − u0 )(v1 − v0 ) rectangle.
The normal vector of the triangle can be obtained as the Having vectors ~T , ~B, ~N in the modeling space and point
cross product of these vectors: ~p0 corresponding to the origin of the tangent space, a point
(u, v, h) in tangent space can be transformed to modeling
~N = ~T × ~B. space as
~T
We often use the unit length normal vector ~N 0 = ~N/|~N|
instead of ~N. Then the surface is displaced by ~N 0 h. How- ~p(u, v) = ~p0 + [u, v, h] · ~B = ~p0 + [u, v, h] · M,
~N
ever, there is a problem. Suppose that the object is scaled
uniformly by a factor s. In this case we expect bumps also where M is the transformation matrix from tangent space to
to grow similarly, but ~N 0 h remains constant. Neither would modeling space. This matrix is also called sometimes as TBN
the elimination of the normalization work, since if the dis- matrix.
placement were defined as ~Nh = (~T × ~B)h, then scaling by s
would multiply the displacement distances by s2 . In order to When transforming a vector d~ = ~p − ~p0 , for example
avoid this, we can set the normal vector that is multiplied by the view and light vectors, from modeling space to tangent
the height value as [Bli78] space, then the inverse of the matrix should be applied:
basis vectors as adding a third vector to the basis vectors of normal, vectors ~t = ~N 0 × ~B and ~b = ~T × ~N 0 can be pre-
the 2D texture space. computed on the CPU and passed to the vertex shader if illu-
mination is computed per vertex, or to the fragment shader if
When height function h(u, v) is stored as a texture, we
illumination is computed per fragment. Since vectors~t and ~b
have to take into account that compact texture formats repre-
are in the tangent plane they can also play the roles of tangent
sent values in the range of [0, 1] with at most 8 bit fixed point
and binormal vectors. Using these vectors the mesostructure
precision, while the height function may have a higher range
normal is
and may have even negative values. Thus the stored values
should be scaled and biased. Generally we use two con- ~N 0 = ~N +~t ∂h +~b ∂h . (9)
stants SCALE and BIAS and convert the stored texel value ∂u ∂v
Texel(u, v) as
The following fragment shader code computes the
h(u, v) = BIAS + SCALE · Texel(u, v). (8) mesostructure normal according to this formula, replacing
the derivatives by finite differences. The macrostructure nor-
Height maps are often stored in the alpha channel of con- mal ~N, and tangent plane vectors ~t, ~b are passed in registers
ventional color textures. Such representations are called re- and are denoted by N, t, and b, respectively. The texture co-
lief textures [OB99, OBM00]. Relief textures and their ex- ordinates of the current point are in uv and the displacement
tensions are also used in image based rendering algorithms is in the alpha channel of texture map hMap of resolution
[Oli00, EY03, PS02]. WIDTH×HEIGHT.
float2 du=float2(1/WIDTH, 0);
Although this review deals with those displacement map-
float2 dv=float2(0, 1/HEIGHT);
ping algorithms which store the height map in a two dimen-
float dhdu = SCALE/(2/WIDTH) *
sional texture, we mention that three dimensional textures (tex2D(hMap, uv+du).a -
also received attention. Dietrich [Die00] introduced eleva- tex2D(hMap, uv-du).a);
tion maps, converting the height field to a texture volume. float dhdv = SCALE/(2/HEIGHT) *
This method can lead to visual artifacts at grazing angles, (tex2D(hMap, uv+dv).a -
where the viewer can see through the spaces between the tex2D(hMap, uv-dv).a);
slices. Kautz and Seidel [KS01] extended Dietrich’s method // get model space normal vector
and minimized the errors at grazing angles. Lengyel used a float3 mNormal = normalize(N+t*dhdu+b*dhdv);
rendering technique to display fur interactively on arbitrary On the other hand, instead of evaluating this formula to
surfaces [LPFH01]. obtain mesostructure normals we can also use normal maps
which store the mesostructure normals in textures. Height
values and normal vectors are usually organized in a way
2.1. Lighting displacement mapped surfaces
that the r, g, b channels of a texel represent either the tangent
When mesostructure geometry ~r = ~p + ~N 0 h is shaded, its space or the modeling space normal vector, and the alpha
real normal vector should be inserted into the illumination channel the height value.
formulae. The mesostructure normal vector can be obtained
Storing modeling space normal vectors in normal maps
in modeling space as the cross product of two vectors in its
has the disadvantage that the normal map cannot be tiled
tangent plane. These vectors can be the derivatives accord-
onto curved surfaces since multiple tiles would associate
ing to texture coordinates u, v [Bli78]. Using equation 1 we
the same texel with several points on the surface, which do
obtain
not necessarily have the same mesostructure normal. Note
∂~r ∂~p ~ 0 ∂h ∂~N 0 ∂h that by storing tangent space normal vectors this problem is
= +N + h ≈ ~T + ~N 0
∂u ∂u ∂u ∂u ∂u solved since in this case the mesostructure normal depends
since ∂~p/∂u = ~T and on a smooth macrostructure surface not only on the stored normal but also on the transformation
∂~N 0 /∂u ≈ 0. Similarly, the partial derivative according to v between tangent and modeling spaces, which can follow the
is orientation change of curved faces.
∂~r ∂~p ~ 0 ∂h ∂~N 0 ∂h Having the mesostructure normal, the next crucial prob-
= +N + h ≈ ~B + ~N 0 . lem is to select the coordinate system where we evaluate the
∂v ∂v ∂v ∂v ∂v
illumination formula, for example, the Phong-Blinn reflec-
The mesostructure normal vector is the cross product of tion model [Bli77]. Light and view vectors are available in
these derivatives: world or in camera space, while the shading normal is usu-
~N 0 = ∂~r × ∂~r = ~N + (~N 0 × ~B) ∂h + (~T × ~N 0 ) ∂h , ally available in tangent space. The generally correct solu-
∂u ∂v ∂u ∂v tion is to transform the normal vector to world or camera
space and evaluate the illumination there. However, if the
since ~T × ~B = ~N and ~N 0 × ~N 0 = 0.
mappings between world space and modeling space, and be-
In order to speed up the evaluation of the mesostructure tween modeling space and tangent space are angle preserv-
ing, then view and light vectors can also be transformed to 3.1. Vertex modification on the vertex shader
tangent space and we can compute the illumination formula
The vertices of the triangles are displaced in the direction
here.
of the normal of the macrostructure surface according to the
height map. New, mesostructure normal vectors are also as-
signed to the displaced vertices to accurately simulate the
2.2. Obtaining height and normal maps
surface lighting. Since the introduction of Shader Model 3.0
Height fields are natural representations in a variety of con- compatible hardware, the vertex shader is allowed to access
texts, including e.g. water surface and terrain modeling. the texture memory, thus the height map can be stored in a
In these cases, height maps are provided by simulation or texture. In earlier, Shader Model 1 or 2 compatible hardware
measurement processes. Height maps are gray scale im- only procedural displacement mapping could be executed in
ages and can thus also be generated by 2D drawing tools. the vertex shader.
They can be the results of surface simplification when the
difference of the detailed and the macrostructure surface
is computed [CMSR98, Bla92, ATI03]. In this way height highly tessellated
modified vertices
and normal map construction is closely related to tessel- macrostructure surface vertex
rasterization fragment
shader shader
lation [GH99, DH00, DKS01, MM02, EBAB05] and subdi-
vision algorithms [Cat74, BS05]. Using light measurement height map stored
as a texture
tools and assuming that the surface is diffuse, the mesostruc-
ture of the surface can also be determined from reflection
patterns using photometric stereo also called shape from Figure 3: Displacement mapping on the vertex shader
shading techniques [ZTCS99, RTG97, LKG∗ 03].
Displacement maps can also be the results of rendering The following vertex shader program takes modeling
during impostor generation, when complex objects are ras- space point Position with macrostructure normal vec-
terized to textures, which are then displayed instead of the tor Normal and texture coordinates uv, reads height map
original models [JWP05]. Copying not only the color chan- hMap, computes modeling space vertex position mPos, and
nels but also the depth buffer, the texture can be equipped transforms the modified point to clipping space hPos:
with displacement values [OBM00, MJW07].
float h = tex2Dlod(hMap, uv).a * SCALE + BIAS;
The height map texture is a discrete representation of a float3 mPos = Position + Normal * h;
continuous function, thus can cause aliasing and sampling hPos = mul(float4(mPos,1), WorldViewProj);
artifacts. Fournier [Fou92] pre-filtered height maps to avoid
aliasing problems. Standard bi- and tri-linear interpolation Figure 4 has been rendered by this vertex shader. Note
of normal maps work well if the normal field is continu- that the macrostructure geometries, which are a square and
ous, but may result in visible artifacts in the areas where the a cylinder, should be finely tessellated to allow vertex dis-
placement.
field is discontinuous, which is common for surfaces with
creases and dents. Sophisticated filtering techniques based Per vertex displacement mapping really changes the ge-
on feature-based textures [WMF∗ 00, TC05, PRZ05] and sil- ometry, thus it can handle cases when the surface is curved,
houette maps [Sen04] have been proposed in the more gen- and can provide correct silhouettes automatically, which is a
eral context of texture mapping to overcome these problems. great advantage.
The problems of vertex displacement methods are as fol-
3. Per-vertex displacement mapping on the GPU lows:
• The number of the used vertices can be very high, which
Displacement mapping can be implemented either in the ver-
contradicts to that the aim of displacement mapping in
tex shader modifying the vertices, or in the fragment shader
hardware accelerated environment is to reduce the vertex
re-evaluating the visibility or modifying the texture coordi-
number without losing surface detail.
nates. This section presents the vertex shader solution.
• If the displacement is done on the GPU, performing
Graphics hardware up to Shader Model 3 (or Direct3D 9) shadow computations on CPU gives either incorrect re-
is unable to change the topology of the triangle mesh, thus sults, or takes too long because the transformed data must
only the original vertices can be perturbed. This has been be fed back to the CPU. Thus, the only way to go is
changed in Shader Model 4 (i.e. Direct3D 10) compatible to compute shadows on the GPU, which is rather prob-
hardware. Assuming Shader Model 3 GPUs the real modifi- lematic if shadow volumes are used [HLHS03] and the
cation of the surface geometry requires a highly tessellated, GPU does not have a geometry shader. Thus under Shader
but smooth surface, which can be modulated by a height map Model 4 we are better off if the depth mapped shadow
in the vertex shader program. method is implemented [Cro77, WSP04].
pixel
• GPUs have usually more pixel-processing power than modified visibility
ray
visible point
vertex-processing power, but the unified shader architec-
ture [Sco07] can find a good balance. processed
• Pixel shaders are better equipped to access textures. Older macrostructure
point
There are quite a few difficulties to implement per-pixel Per-pixel displacement mapping approaches can be
displacement mapping: mainly categorized according to how they attack the first two
challenges of this list, that is, whether or not they aim at ac-
curate intersection calculation and at always finding the first
intersection.
Non-iterative or single-step methods correct the texture
coordinates using just local information, thus they need only
at most one extra texture access but may provide bad results.
Iterative methods explore the height field globally thus
they can potentially find the exact intersection point but they
read the texture memory many times for each fragment. Iter-
ative techniques can be further classified to safe methods that
try to guarantee that the first intersection is found, and to un-
safe methods that may result in the second, third, etc. inter-
section point if the ray intersects the height field many times.
Since unsafe methods are much faster than safe methods it
makes sense to combine the two approaches. In combined
methods first a safe iterative method reduces the search space
to an interval where only one intersection exists, then an un- FPS = 695 FPS = 690
safe method computes the accurate intersection quickly.
Figure 8: Texture mapping (left) and texture mapping with
In the following subsections we review different fragment bump mapping (right).
shader implementations of the height field rendering.
N
normal
4.1.2. Parallax mapping
normal
view
light Taking into account the height at the processed point par-
h allax mapping [KKI∗ 01] not only controls the shading nor-
macrostructure T, B macrostructure mals as bump mapping, but also modifies the texture coordi-
surface surface
nates used to obtain mesostructure normals and color data.
Figure 7: Bump mapping
N
constant height V
surface
Bump mapping [Bli78] can be seen as a strongly sim-
plified version of displacement mapping (figure 7). We in- h
cluded bump mapping into this survey for the sake of com- macrostructure T, B (u,v) (u’,v’)
pleteness and to allow comparisons. If the uneven surface surface
has very small bumps it can be estimated as being totally
flat. In case of flat surfaces the approximated visible point Figure 9: Parallax mapping
(u0 , v0 , h(u0 , v0 )) is equal to the processed point (u, v, 0).
However, in order to visualize bumps, it is necessary to sim-
The texture coordinates are modified assuming that the
ulate how light affects them. The simplest way is to read the
height field is constant h(u, v) everywhere in the neighbor-
mesostructure normal vectors from a normal map and use
hood of (u, v). As can be seen in figure 9, the original (u, v)
these normals to perform lighting.
texture coordinates get substituted by (u0 , v0 ), which are
This technique was implemented in hardware calculated from the direction of tangent space view vector
even before the emergence of programmable GPUs ~V = (Vx ,Vy ,Vz ) and height value h(u, v) read from a texture
[PAC97, Kil00, BERW97, TCRS00]. A particularly popular at point (u, v). The assumption on a constant height surface
simplifies the ray equation to • When the surface is seen from a roughly perpendicu-
0 0 lar direction and thus Vz ≈ 1, then the offset is again
(u , v , h(u, v)) = (u, v, 0) + ~V t,
h(u, v)(Vx ,Vy ) without any offset limiting.
which has the following solution:
µ ¶ Thus offset limiting can be implemented if the division by Vz
0 0 Vx Vy is eliminated, which makes the implementation even simpler
(u , v ) = (u, v) + h(u, v) , .
Vz Vz than that of the original parallax mapping. However, elimi-
nating the division by Vz even when Vz is large causes the
In the following implementation the tangent space view “swimming” of the texture, that is, the texture appears to
vector is denoted by View, and texture coordinates uv of slide over the surface.
the processed point are modified to provide the texture coor-
dinates of the approximate visible point: Since parallax mapping is an approximation, any limiting
value could be chosen, but this one works well enough and
float h = tex2D(hMap, uv).a * SCALE + BIAS; it reduces the code in the fragment program by two instruc-
uv += h * View.xy / View.z;
tions. The implementation of offset limiting is as follows:
View = normalize(View);
float h = tex2D(hMap, uv).a * SCALE + BIAS;
uv += h * View.xy;
N
constant height V 4.1.4. Parallax mapping taking into account the slope
surface
h
Parallax mapping assumes that the surface is a constant
macrostructure height plane. A better approximation can be obtained if we
T, B (u,v) (u’,v’)
surface assume that the surface is still planar, but its normal vector
can be arbitrary (i.e. this surface is not necessarily parallel
Figure 11: Parallax mapping with offset limiting with the macrostructure surface). The normal of the approx-
imating plane can be taken as the normal vector read from
the normal map, thus this approach does not require any fur-
A simple way to solve the problem of parallax mapping
ther texture lookups [MM05].
at grazing angles is to limit the offsets so that they never
get larger than the height at (u, v) [Wel04]. Asssuming the A place vector of the approximating plane is (u, v, h(u, v)).
view vector to be normalized, and examining parallax offset The normal vector of this plane is the shading normal
h(u, v)(Vx /Vz ,Vy /Vz ), we can conclude that ~N 0 (u, v) read from the normal map at (u, v). Substituting the
ray equation into the equation of the approximating plane,
• When the surface is seen at grazing angles and thus Vz ¿
we get
Vx ,Vy , then offset limiting takes into effect, and the offset
becomes h(u, v)(Vx ,Vy ). ~N 0 · ((u, v, 0) + ~V t) = ~N 0 · (u, v, h). (12)
N end points where one end is above while the other is be-
V low the height field. As has been pointed out in [SKALP05]
5 1
3 the name “secant” is not precise from mathematical point of
4 view since the secant method in mathematics always keeps
2
the last two guesses and does not care of having a pair of
(u’,v’) T, B points that enclose the intersection. Mathematically the root
finding scheme used in displacement mapping is equivalent
Figure 16: Binary search that stops at point 5 to the false position method. We note that it would be worth
checking the real secant algorithm as well, which almost al-
ways converges faster than the false position method, but un-
decide whether or not the middle point is below the surface. fortunately, its convergence is not guaranteed in all cases.
Then we keep that half interval where one endpoint is above
while the other is below the height field. V
N
In the following implementation the texture coordinates at
the entry and exit points are denoted by uvin and uvout, ∆a ∆b Hb
respectively, and the height values at the two endpoints of Ha
the current interval are Hmin and Hmax. macrostructure T, B (u,v) (u’,v’)
surface
float2 uv; // texture coords of intersection
for (int i = 0; i < BIN_ITER; i++) { Figure 18: The secant method
H = (Hmin + Hmax)/2; // middle
uv = uvin * H + uvout * (1-H);
float h = tex2D(hMap, uv).a; To discuss the implementation of the secant method, let
if (H <= h) Hmin = H; // below us consider the last two points of the linear search, point
else Hmax = H; // above ~b that is below the height field, and ~a that is the last point
} which is above the height field. Points ~b and ~a are associated
with height parameters Hb and Ha , respectively. The level
differences between the points on the ray and the height field
at ~a and ~b are denoted by ∆a and ∆b , respectively (note that
∆a ≥ 0 and ∆b < 0 hold). Figure 18 depicts these points in
the plane containing viewing vector ~V . We wish to obtain the
intersection point of the view ray and of the line between the
points on the height field just above ~a and below ~b.
Using figure 18 and the simple similarity, the ray parame-
ter of the intersection point is
∆a
Hnew = Hb + (Ha − Hb ) .
Figure 17: Binary search using 5 iteration steps. The ren- ∆a − ∆b
dering speed is 455 FPS.
Note that we should use ∆b with negative sign since ∆b
means a signed distance and it is negative.
The binary search procedure quickly converges to an in- Checking the height here again, the new point may be ei-
tersection but may not result in the first intersection that has ther above or below the height field. Replacing the previous
the maximum height value (figure 17). point of the same type with the new point, the same proce-
dure can be repeated iteratively.
4.2.3. Secant method
The secant algorithm is as follows:
Binary search simply halves the interval potentially contain-
ing the intersection point without taking into account the for (int i = 0; i < SEC_ITER; i++) {
underlying geometry. The secant method [YJ04, RSP06] on H = Hb + (Ha-Hb) /(Da-Db) * Da;
float2 uv = uvin * H + uvout * (1-H);
the other hand, assumes that the surface is planar between
D = H - tex2D(hMap, uv).a ;
the two guesses and computes the intersection between the if (D < 0) {
planar surface and the ray. It means that if the surface were Db = D; Hb = H;
really a plane between the first two candidate points, this } else {
intersection point could be obtained at once. The height Da = D; Ha = H;
field is checked at the intersection point and one endpoint }
of the current interval is replaced keeping always a pair of }
4.3. Safe iterative methods from algorithmic point of view, but GPUs prefer loops of
constant number of cycles.
Safe methods pay attention to finding the first intersection
even if the ray intersects the height field several times. The
first algorithm of this section, called linear search is only
“quasi-safe”. If the steps are larger than the texel size, this
algorithm may still fail, but its probability is low. Other tech-
niques, such as the dilation-erosion map, the sphere, cone,
and pyramidal mapping are safe, but require preprocessing
that generates data encoding the empty spaces in the height
field. Note that safe methods guarantee that they do not skip
the first intersection, but cannot guarantee that the intersec- FPS = 410 FPS = 340
tion is precisely located if the number of iterations is limited. LIN_ITER = 4 LIN_ITER = 8
In cone tracing every height field texel is given a cone that 4.4. Combined iterative methods
represents the empty space above it (figure 24). The tip of the Combined iterative methods combine a safe or quasi-safe
cone is the heightfield surface at that texel, its axis is parallel technique to provide robustness and an unsafe method that
to axis z in tangent space, thus the only parameter that needs is responsible for finding the intersection quickly. The safe
to be stored to define the cone is its apex angle or the slope method should only find a rough approximation of the first
of its boundary. intersection and should make sure that from this approxi-
Suppose that the current approximation on the ray is mation the unsafe method cannot fail. Table 1 lists iterative
(u, v, 0) + ~V ti = (ui , vi , Hi ). The height at this point is hi = displacement mapping methods together with their first ref-
h(ui , vi ). The next approximation, erence. The columns correspond to the safe phase, while the
rows to the unsafe phase. Methods where a particular phase
(ui , vi , Hi ) − ~V ∆ti = (ui+1 , vi+1 , Hi+1 ), is missing are shown in the “NO” row or column. Combined
is calculated as the intersection of this ray and the cone methods belong to cells where both phases are defined.
standing at (ui , vi , hi ). The equation of the cone standing at
the height field is 4.4.1. Relief mapping
0 2 0 2 2 0 2 The pixel shader implementation [POC05, PO05] of relief
(u − ui ) + (v − vi ) = m (h − hi ) ,
mapping [OBM00, Oli00] uses a two phase root-finding ap-
where m equals to the ratio of the cone radius and height, proach to locate the intersection of the height field and the
and expresses the apex angle of the cone. Substituting the ray. The first phase is a linear search, i.e. ray-marching,
ray equation into the equation of this cone we obtain which finds a pair of points on the ray that enclose the possi-
(Vx2 +Vy2 )∆ti2 = m2 (Hi −Vz ∆ti − hi )2 . bly first intersection. The second phase refines these approx-
imations by a binary search (figure 26).
Solving it for unknown step ∆ti , we get
m(Hi − hi )
∆ti = q
Vx2 +Vy2 + mVz
Table 1: Classification of iterative displacement mapping (DM) methods. The columns correspond to the first phase (if any)
while rows correspond to the second phase.
4.4.2. Combined linear and secant search placement mapping, for example in curved reflection com-
putation [UPSK07] and isosurface extraction of volumetric
Ray marching can also be improved combined with a series
data [HSS∗ 05].
of geometric intersections, according to the secant method.
The first pass of these algorithms is also a linear search.
This kind of combined approach was first proposed by Yerex 4.4.3. Relaxed Cone Stepping
[YJ04] and independently in Parallax Occlusion Mapping
[BT04, Tat06a, Tat06b], and showed up in Interval mapping max level N conservative
[RSP06] too. surface cone relaxed
cone
The ratio of the number of linear search steps and the
number of refinement steps using either binary search or
the secant method should be selected carefully. Taking more
linear search steps increases robustness, and we should also macrostructure
take into account that a linear search step is executed faster surface
by the graphics hardware. The reason is that the texture co-
ordinates of linear search steps do not depend on the results Figure 28: Difference between conservative and relaxed
of previous texture fetches unlike the texture coordinates ob- cones used in cone stepping
tained by binary search or by the secant method, which do
depend on the values stored in textures. This dependency is Cone stepping defines a cone with a maximum angle that
often referred to as dependent texture fetching, and results in would not cause the cone to intersect the height field for each
poorer texture cache utilization and therefore longer latency. texel of the displacement map. This strict rule will cause the
It means that the number of secant steps should be small. In rays to stop before reaching the surface, which leads to er-
practice 1–2 secant steps are sufficient (figure 27). rors and artifacts if the iteration number is limited. Relaxed
cone stepping relaxes this rule and defines the cones with the
maximum angle that would not cause the view ray to inter-
sect the height field more than once [PO07].
max level N
surface
H i-1
FPS = 310 FPS = 225
Hi
LIN_ITER = 4 LIN_ITER = 8
SEC_ITER = 2 SEC_ITER = 1 macrostructure (ui ,vi ) (ui-1 ,vi-1)
surface
Figure 27: Combined linear and secant search
Figure 29: Relaxed cone stepping
5.1. Silhouette processing for curved surfaces hi ≈ a(ui − u0 )2 + b(ui − u0 )(vi − v0 ) + c(vi − v0 )2 .
In order to get better silhouettes, we have to locally deform since h0 = 0 in the tangent space of ~p0 . This is a linear sys-
the height field according to the curvature of the smooth ge- tem
ometry [OP05]. The mesostructure geometry ~r(u, v) is usu-
ally approximated locally by a quadrics [SYL02] in tangent e = A · x,
space (compare this second order approximation to the first where e = [h1 , . . . , hn ]T is an n-element vector,
order approximation of equation 3):
∂~r (u1 − u0 )2 , (u1 − u0 )(v1 − v0 ), (v1 − v0 )2
∂u .. .. ..
~r(u, v) ≈ ~q(u, v) =~r(u0 , v0 ) + [u − u0 , v − v0 ] · + A= . . .
∂~r
∂v (un − u0 )2 , (un − u0 )(vn − v0 ), (vn − v0 )2
N ray N
(u,v) T, B (u,v)
ray h
The height function of the bumpy surface is approxi- In Hirche’s local ray tracing method [HEGD04] during
mately hq (u, v) + h(u, v). Note that this is only an approx- the rasterization of the prism faces ray marching is used to
imation since we should have moved the height into the di- detect an intersection with the displaced surface. At each
rection of the normal vector of the quadratic surface, which sample point on the ray, the height of the sampling position
is not constant any more. However, for smaller curvatures, is compared to the height field (figure 31). If an intersection
this approximation is acceptable. To make sure that the ras- is detected, the resulting fragment is shaded, its depth is re-
terizer does not miss fragments, h(u, v) must be negative. evaluated, and the fragment is written into the framebuffer
The ray tracing scenario is shown by figure 30. In order with its correct z-value. The original algorithm executed the
to trace back this problem to the previous ones where the prism construction on the CPU, but in Shader Model 4 GPUs
macrostructure surface is flat, let us apply a non-linear warp- the geometry shader can also do that. The ray segment where
ing to the whole space, which flattens the quadratic surface the marching algorithm should run is bounded by the points
to a plane. The required warping at (u, v) is −hq (u, v). This where the ray enters and exits the prism. The entry posi-
warping transforms the ray as well, so the original ray equa- tion is given by rasterization, but the computation of the exit
tion ray(t) = (u, v, 0) − ~V t is modified to point is not so straightforward. Hirche used an adaptation of
the Projected tetrahedra algorithm by Shirley and Tuchman
ray0 (t) = (u, v, 0) − t~V − hq (u −Vx t, v −Vy t) = [ST90], while Wang et al. [WTL∗ 04] computed ray-plane
intersections for the current view ray to find the exit point.
(u, v, 0) − t~V − t 2~N(aVx2 + bVxVy + cVy2 ). Another problem that can occur while extruding prisms
is that the vertices defining one side of the prism are not
It means that we can use ray marching, but the steps should necessary coplanar. This can cause problems if two adjacent
be updated according to this formula. When the z coordinate prisms split their neighboring sides differently into two trian-
of the ray gets negative, it leaves the space of possible inter- gles, which can lead to cracks. This problem can be solved
sections. If we have not found any intersection so far, then with the correct ordering of the new vertices of the prism
this fragment should be discarded. faces.
Dufort et al. used a voxel traversal algorithm inside the is in shadow or not (figure 33). Using more than one light
bounding prism [DLP05]. This method can simulate dis- vector per light source, even soft shadows can be generated
placement maps as well as semitransparent surface details, [Tat06a, Tat06b].
including several surface shading effects (visual masking,
self-shadowing, absorption of light) at interactive rates.
The idea of mapping a three-dimensional volume onto a
surface with prisms also showed up in shell maps [PBFJ05].
FPS = 85 FPS = 42
Figure 33: The secant method without (left) and with self-
shadowing (right) setting LIN_ITER = 32, SEC_ITER = 4
6.2. Displacement mapping with precomputed visibility In [WD05] a compression method is presented that com-
bines k-means clustering and non-negative matrix factoriza-
Heidrich et al. introduced a method similar to horizon map-
tion. Wang et al. introduced an extension of View depen-
ping [HDKS00], but instead of storing zenith angles, they
dent displacement maps, called Generalized displacement
stored the visible points at predefined directions. If we as-
maps (GDM) [WTL∗ 04]. This method can model surfaces
sume that the height map is attached to a specific, fixed base
with more than one offset value per texel, thus arbitrary non-
geometry, we can precompute for each point on the height
height-field mesostructure. Furthermore, the GDM approach
field and for each discrete direction the point which is hit
overcomes both the texture distortion problems of VDM
by this ray. Since this intersection point is some point in the
and the computational expense of directly mapped geometry
same height field, it is unambiguously characterized by a 2D
by computing visibility jointly in texture space and object
texture coordinate. By chaining together this visibility infor-
space.
mation, we can also generate a multitude of different light
paths for computing the indirect illumination in the height
field.
7. Conclusions
To determine if a given point lies in the shadow for some
light direction, we can simply find the closest direction and In this paper we reviewed vertex shader and fragment shader
check whether a height field point is stored for this ray. For a solutions of displacement mapping. Their comparative ad-
higher quality test, we can easily determine the three direc- vantages and disadvantages depend on the properties of the
tions that are close to the light direction, and then interpolate scene, including the number of triangles that are subject to
the visibility values. This yields a visibility factor between 0 displacement mapping and the number of pixels covered by
and 1 defining a smooth transition between light and shadow. them.
The complexity, i.e. the rendering time, of vertex shader
6.3. View dependent displacement mapping based approaches depends on the number of triangles gen-
erated by displacement mapping. This number corresponds
View dependent displacement mapping [WWT∗ 04] also to the resolution of the height map. A 256 × 256 resolution
takes a pre-computation approach. While this method pro- height map generates 128 thousand triangles when mapped
vides the highest quality results, handles shadows and onto an object. Thus if there are many objects in the scene
curved surfaces as well, it also requires considerable prepro- (including those that are not even visible and are eliminated
cessing time and storage space. by the graphics pipeline) and we use high resolution height
This method takes pre-defined view rays and computes maps, then vertex shader methods get slower. To compen-
the difference of the base surface and the visible point for sate this, view and visibility culling [WB05] is worth using
each texel and for each view ray. To handle curved surfaces, and we should not send the surely invisible objects to the
this operation is repeated for a couple of curvature values rendering pipeline. On the other hand, level of detail tech-
defined along the view ray. niques may be introduced. We may maintain several ver-
sions of the same height field (mip-mapping) and of the same
The results of this precomputation is a 5D function called object tessellated on different levels, and render one object
View dependent displacement map (VDM), which can be in- and mip-map level corresponding to the distance from the
terpreted as an array of distances dV DM [u, v, θ, φ, c]. Indices camera. Note that this decision and the level of detail se-
of this array are the u, v texture coordinates, the θ, φ spher- lection must be done by the CPU, because the GPU cannot
ical coordinates of the view direction in tangent frame, and alter the tessellation level (this changes from Shader Model
curvature c along the view direction. 4). It is widely believed that vertex shader approaches are
When a texel (u, v) is processed, first the curvature of the slower than fragment shader approaches since GPUs have
mean surface along the view direction is determined: more pixel-processing power than vertex-processing power,
and pixel shaders are better equipped to access textures. Ac-
cmax (~Dmax · ~V )2 + cmin (~Dmin · ~V )2 cording to our tests, however, this is not the case anymore.
c=
1 − (~N · ~V )2 We think that this belief was born when the vertex shaders
were not able to read textures, but those times are gone.
where cmax and cmin are the principal curvature values cor-
responding to principal curvature directions ~Dmax and ~Dmin , Per vertex displacement mapping really changes the ge-
respectively. The θ, φ values can be obtained from viewing ometry, thus it can handle cases curved surfaces and can
vector ~V . Having these, the new texture coordinates are provide correct silhouettes automatically. They can be seam-
lessly incorporated into depth mapped shadow algorithms,
(u0 , v0 ) = (u, v) + dV DM [u, v, θ, φ, c](Vx ,Vy ).
but shadow volumes require geometry shader or complicated
In order to cope with the high storage requirements, singular vertex shader approaches. Vertex shader solutions are rela-
value decomposition can be used to compress the 5D func- tively easy to implement. Summarizing, vertex shader solu-
tion and replace it by lower dimensional tables. tions are the winners if only a part of the scene is displace-
parallax mapping with offset limiting parallax mapping with slope iterative parallax mapping
ment mapped, or we apply view culling or level of detail tics, and thus has high resolution, and the objects are small
techniques, or if the displacements are really large. (i.e. usually cover just a smaller part of the screen), and the
displacements are also small, so approximation errors are not
The rendering time of fragment shader approaches de- so visible.
pends on the number of pixels covering the displacement
mapped objects. Thus if we usually get far from these objects
or the objects are not visible, then fragment shader methods
are faster than vertex shader techniques.
Displacement mapping also has limitations. For example,
Fragment shader methods are approximate by nature, al- it is constrained to a one-valued height field so holes can-
though different algorithms take different compromises be- not be added. This restriction is addressed by Deformation
tween accuracy and speed. An accurate solution that handles displacement mapping [Elb02, SKE05] and Generalized dis-
silhouettes as well is quite difficult to implement, and the im- placement mapping [WTL∗ 04]. However, despite to its limi-
plementation is rather slow. Thus fragment shader solutions tations, it has become a popular technique and we can expect
are viable if the height map has high frequency characteris- its increasing role in games and real-time systems.
Figure 35: Comparison of high quality mapping techniques assuming extreme displacement sizes
S HENKAR V.: A Real-Time Photo-Realistic Visual Fly- [Gat03] G ATH J.: Derivation of the tangent space
through. IEEE Transactions on Visualization and Com- matrix, 2003. http://www.blacksmith-studios.dk/
puter Graphics 2, 3 (1996), 255–264. projects/downloads/tangent_matrix_derivation.php.
[Cro77] C ROW F. C.: Shadow algorithm for computer [GH99] G UMHOLD S., H ÜTTNER T.: Multiresolution
graphics. In Computer Graphics (SIGGRAPH ’77 Pro- rendering with displacement mapping. In HWWS ’99:
ceedings) (1977), pp. 242–248. Proceedings of the ACM SIGGRAPH/EUROGRAPHICS
[CT81] C OOK R., T ORRANCE K.: A reflectance model workshop on Graphics hardware (1999), ACM Press,
for computer graphics. Computer Graphics 15, 3 (1981), pp. 55–66.
7–24. [Har93] H ART J. C.: Sphere tracing: Simple robust an-
[Dan80] DANIELSSON P.: Euclidean distance mapping. tialiased rendering of distance-based implicit surfaces. In
Computer Graphics and Image Processing 14 (1980), SIGGRAPH 93 Course Notes: Modeling, Visualizing, and
227–248. Animating Implicit Surfaces. 1993, pp. 14–1 to 14–11.
[DGNK97] DANA K., G INNEKEN B., NAYAR S., KOEN - [HDKS00] H EIDRICH W., DAUBERT K., K AUTZ J., S EI -
DERINK J.: Reflectance and texture of real-world sur- DEL H.-P.: Illuminating micro geometry based on pre-
faces. ACM Transactions on Graphics 18, 1 (1997), 1–34. computed visibility. In SIGGRAPH 2000 Proceedings
(2000), pp. 455–464.
[DH00] D OGGETT M., H IRCHE J.: Adaptive view depen-
dent tessellation of displacement maps. In HWWS ’00: [Hec86] H ECKBERT P. S.: Survey of texture mapping.
Proceedings of the ACM SIGGRAPH/EUROGRAPHICS IEEE Computer Graphics and Applications 6, 11 (1986),
workshop on Graphics hardware (2000), ACM Press, 56–67.
pp. 59–66. [HEGD04] H IRCHE J., E HLERT A., G UTHE S.,
[Die00] D IETRICH S.: Elevation Maps. NVIDIA Corpo- D OGGETT M.: Hardware accelerated per-pixel displace-
ration, 2000. ment mapping. In Proceedings of Graphics Interface
(2004), pp. 153–158.
[DKS01] D OGGETT M. C., K UGLER A., S TRASSER W.:
Displacement mapping using scan conversion hardware [HLHS03] H ASENFRATZ J.-M., L APIERRE M.,
architectures. Computer Graphics Forum 20, 1 (2001), H OLZSCHUCH N., S ILLION F. X.: A survey of
13–26. realtime soft shadow algorithms. In Eurographics
Conference. State of the Art Reports (2003).
[DLP05] D UFORT J.-F., L EBLANC L., P OULIN P.: Inter-
active rendering of meso-structure surface details using [HS98] H EIDRICH W., S EIDEL H.-P.: Ray-tracing proce-
semi-transparent 3d textures. In Proc. Vision, Modeling, dural displacement shaders. In Proceedings of Graphics
and Visualization 2005 (2005), pp. 399–406. Interface (1998), pp. 8–16.
[Don05] D ONELLY W.: Per-pixel displacement mapping [HS04] H ENNING C., S TEPHENSON P.: Accelerating the
with distance functions. In GPU Gems 2, Parr M., (Ed.). ray tracing of height fields. In GRAPHITE ’04: Pro-
Addison-Wesley, 2005, pp. 123–136. ceedings of the 2nd international conference on Com-
puter graphics and interactive techniques in Australia and
[Dum06] D UMMER J.: Cone Step Mapping: An Iterative
South East Asia (2004), ACM Press, pp. 254–258.
Ray-Heightfield Intersection Algorithm. Tech. rep., 2006.
http://www.lonesock.net/files/ConeStepMapping.pdf. [HSS∗ 05] H ADWIGER M., S IGG C., S CHARSACH H.,
B ÜHLER K., G ROSS M.: Real-time ray-casting and ad-
[EBAB05] E SPINO F. J., B ÓO M., A MOR M.,
vanced shading of discrete isosurfaces. In Eurographics
B RUGUERA J. D.: Adaptive tessellation of bézier
Conference (2005), pp. 303–312.
surfaces based on displacement maps. In The 13-th
International Conference in Central Europe on Computer [HTSG91] H E X., T ORRANCE K., S ILLION F., G REEN -
Graphics, Visualization and Computer Vision (2005), BERG D.: A comprehensive physical model for light re-
pp. 29–32. flection. Computer Graphics 25, 4 (1991), 175–186.
[Elb02] E LBER G.: Geometric deformation-displacement [JWP05] J ESCHKE S., W IMMER M., P URGATHOFER W.:
maps. In PG ’02: Proceedings of the 10th Pacific Confer- Image-based representations for accelerated rendering of
ence on Computer Graphics and Applications (Washing- complex scenes. In Eurographics, 2005. State of the Art
ton, DC, USA, 2002), IEEE Computer Society, p. 156. Reports (2005), p. 61.
[EY03] E L H ELW M. A., YANG G.-Z.: Cylindrical relief [Kil00] K ILGARD M.: A practical and robust
texture mapping. Journal of WSCG 11 (2003), 125–132. bump-mapping technique for today’s GPU’s, 2000.
[Fou92] F OURNIER A.: Filtering Normal Maps and Cre- http://www.nvidia.com/.
ating Multiple Surfaces. Tech. rep., Vancouver, BC, [KKI∗ 01] K ANEKO T., K AKAHEI T., I NAMI M.,
Canada, 1992. K AWAKAMI N., YANAGIDA Y., M AEDA T., TACHI S.:
Detailed shape representation with parallax mapping. In [OB99] O LIVEIRA M. M., B ISHOP G.: Relief Textures.
Proceedings of ICAT 2001 (2001), pp. 205–208. Tech. rep., Chapel Hill, NC, USA, 1999.
[KRS05] KOLB A., R EZK -S ALAMA C.: Efficient empty [OBM00] O LIVEIRA M. M., B ISHOP G., M C A LLISTER
space skipping for per-pixel displacement mapping. In D.: Relief texture mapping. In SIGGRAPH 2000 Pro-
Vision, Modeling and Visualization (2005). ceedings (2000), pp. 359–368.
[KS01] K AUTZ J., S EIDEL H.-P.: Hardware accelerated [OK06] O H K., K I H.: Pyramidal displacement mapping:
displacement mapping for image based rendering. In Pro- A GPU-based atrifacts-free ray tracing through an image
ceedings of Graphics Interface (2001), pp. 61–70. pyramid. In ACM Symposium on Virtual Reality Software
[KSK01] K ELEMEN C., S ZIRMAY-K ALOS L.: A micro- and Technology (VRST’06) (2006), pp. 75–82.
facet based coupled specular-matte BRDF model with im- [Oli00] O LIVEIRA M. M.: Relief Texture Mapping. PhD
portance sampling. In Eurographics 2001, Short papers, thesis, University of North Carolina, 2000.
Manchester (2001), pp. 25–34.
[OP05] O LIVEIRA M. M., P OLICARPO F.: An Efficient
[Lev90] L EVOY M.: Efficient ray tracing of volume data. Representation for Surface Details. Tech. rep., 2005.
ACM Transactions on Graphics 9, 3 (1990), 245–261. UFRGS Technical Report RP-351.
[LKG∗ 03] L ENSCH H. P. A., K AUTZ J., G OESELE M., [PAC97] P EERCY M., A IREY J., C ABRAL B.: Efficient
H EIDRICH W., S EIDEL H.-P.: Image-based reconstruc- bump mapping hardware. In SIGGRAPH 97 Proceedings
tion of spatial appearance and geometric detail. ACM (1997), pp. 303–306.
Transactions on Graphics 22, 2 (2003), 234–257.
[PBFJ05] P ORUMBESCU S. D., B UDGE B., F ENG L.,
[LP95] L OGIE J. R., PATTERSON J. W.: Inverse displace- J OY K. I.: Shell maps. In SIGGRAPH 2005 Proceed-
ment mapping in the general case. Computer Graphics ings (2005), pp. 626–633.
Forum 14, 5 (December 1995), 261–273.
[PH96] P HARR M., H ANRAHAN P.: Geometry caching
[LPFH01] L ENGYEL J., P RAUN E., F INKELSTEIN A.,
for ray-tracing displacement maps. In Eurographics
H OPPE H.: Real-time fur over arbitrary surfaces. In
Rendering Workshop 1996 Proceedings (1996), Springer
Proceedings of the 2001 Symposium on Interactive 3D
Wien, pp. 31–40.
Graphics (2001), ACM Press, pp. 227–232.
[PHL91] PATTERSON J. W., H OGGAR S. G., L OGIE
[LS95] L EE C.-H., S HIN Y. G.: An efficient ray trac-
J. R.: Inverse displacement mapping. Computer Graphics
ing method for terrain rendering. In Pacific Graphics ’95
Forum 10, 2 (1991), 129–139.
(1995), pp. 183–193.
[Max88] M AX N.: Horizon mapping: Shadows for bump- [PO05] P OLICARPO F., O LIVEIRA M. M.: Rendering
mapped surfaces. The Visual Computer 4, 2 (1988), 109– surface details with relief mapping. In ShaderX4: Ad-
117. vanced Rendering Techniques, Engel W., (Ed.). Charles
River Media, 2005.
[MGW01] M ALZBENDER T., G ELB D., W OLTERS H.:
Polynomial texture maps. In SIGGRAPH 2001 Proceed- [PO07] P OLICARPO F., O LIVEIRA M. M.: Relaxed cone
ings (2001), pp. 519–528. stepping for relief mapping. In GPU Gems 3, Nguyen H.,
(Ed.). Addison Wesley, 2007.
[MJW07] M ANTLER S., J ESCHKE S., W IMMER M.: Dis-
placement Mapped Billboard Clouds. Tech. Rep. TR-186- [POC05] P OLICARPO F., O LIVEIRA M. M., C OMBA J.:
2-07-01, Jan. 2007. Real-time relief mapping on arbitrary polygonal surfaces.
In ACM SIGGRAPH 2005 Symposium on Interactive 3D
[MM02] M OULE K., M C C OOL M.: Efficient bounded Graphics and Games (2005), pp. 155–162.
adaptive tessellation of displacement maps. In Proceed-
ings of the Graphics Interface (2002), pp. 171–180. [Pre06] P REMECZ M.: Iterative parallax mapping with
slope information. In Central European Seminar on Com-
[MM05] M C G UIRE M., M C G UIRE M.: Steep
puter Graphics (2006). http://www.cescg.org/CESCG-
parallax mapping. In I3D 2005 Poster (2005).
2006/papers/TUBudapest-Premecz-Matyas.pdf.
http://www.cs.brown.edu/research/graphics/games/
SteepParallax/index.htm. [PRZ05] PARILOV E., ROSENBERG I., Z ORIN D.: Real-
∗ time rendering of normal maps with discontinuities. Tech.
[MMS 04] M UELLER G., M ESETH J., S ATTLER M.,
rep., 2005. CIMS.
S ARLETTE R., K LEIN R.: Acquisition, synthesis and ren-
dering of bidirectional texture functions. In Eurographics [PS02] PARILOV S., S TÜRZLINGER W.: Layered relief
2004, State of the art reports (2004). textures. In WSCG Proceedings (2002), pp. 357–364.
[Mus88] M USGRAVE F. K.: Grid tracing: Fast ray tracing [QQZ∗ 03] Q U H., Q IU F., Z HANG N., K AUFMAN A.,
for height fields. Research Report YALEU/DCS/RR-639 WAN M.: Ray tracing height fields. In Computer Graph-
(1988). ics International (2003), pp. 202–209.
[RSP06] R ISSER E. A., S HAH M. A., PATTANAIK S.: In- mapping with approximate soft shadows. In SI3D ’06:
terval mapping poster. In Symposium on Interactive 3D Proceedings of the 2006 symposium on Interactive 3D
Graphics and Games (I3D) (2006). graphics and games (2006), ACM Press, pp. 63–69.
[RTG97] RUSHMEIER H., TAUBIN G., G UEZIEZ A.: Ap- [Tat06b] TATARCHUK N.: Practical parallax occlusion
plying shape from lighting variation to bump map capture. mapping with approximate soft shadows for detailed sur-
In Proc. 8th Eurographics Rendering Workshop (1997), face rendering. In ShaderX 5, Engel W., (Ed.). Charles
pp. 35–44. River Media, Boston, 2006, pp. 75–105.
[San05] S ANDER P.: DirectX9 High Level Shad- [TC05] TARINI M., C IGNONI P.: Pinchmaps: Textures
ing Language. In Siggraph 2005 Tutorial (2005). with customizable discontinuities. Computer Graphics
http://ati.amd.com/developer/SIGGRAPH05/ Shading- Forum 24, 3 (2005), 557–568.
Course_HLSL.pdf. [TCRS00] TARINI M., C IGNONI P., ROCCHINI C.,
[SBLD03] S UYKENS F., B ERGE K., L AGAE A., D UTRÉ S COPIGNO R.: Real time, accurate, multi-featured ren-
P.: Interactive rendering with bidirectional texture func- dering of bump mapped surfaces. In Eurographics Con-
tions. Computer Graphics Forum (Eurographics 03) 22, ference (2000), vol. 19, 3 of Computer Graphics Forum,
3 (2003), 464–472. pp. 119–130.
[SC00] S LOAN P., C OHEN M.: Interactive horizon map- [UPSK07] U MENHOFFER T., PATOW G., S ZIRMAY-
ping. In Rendering Techniques ’00 (Proc. Eurographics K ALOS L.: Robust multiple specular reflections and re-
Workshop on Rendering) (2000), pp. 281–286. fractions. In GPU Gems 3, Nguyen H., (Ed.). Addison
[Sch94] S CHLAG J.: Fast embossing effects on raster im- Wesley, 2007, pp. 317–338.
age data. In Graphics Gems IV, Heckbert P., (Ed.). Aca- [WB05] W IMMER M., B ITTNER J.: Hardware occlusion
demic Press, 1994, pp. 433–437. queries made useful. In GPU Gems 2. Addison-Wesley,
[Sco07] S COTT W.: Nvidia’s GeForce 8800 2005, pp. 91–108.
graphics processor. Tech. rep., 2007. [WD05] WANG J., DANA K. J.: Compression of view
http://techreport.com/articles.x/11211/1. dependent displacement maps. In Texture 2005: Proceed-
[Sen04] S EN P.: Silhouette maps for improved texture ings of the 4th International Workshop on Texture Analy-
magnification. In HWWS ’04: Proceedings of the ACM sis and Synthesis (2005), pp. 143–148.
SIGGRAPH/EUROGRAPHICS conference on Graphics [Wel04] W ELSH T.: Parallax Mapping with Offset Limit-
hardware (New York, NY, USA, 2004), ACM Press, ing: A PerPixel Approximation of Uneven Surfaces. Tech.
pp. 65–73. rep., Infiscape Corporation, 2004.
[SKALP05] S ZIRMAY-K ALOS L., A SZÓDI B., L AZÁNYI [WMF∗ 00] WANG X. C., M AILLOT J., F IUME E., N G -
I., P REMECZ M.: Approximate ray-tracing on the GPU T HOW-H ING V., W OO A., BAKSHI S.: Feature-based
with distance impostors. Computer Graphics Forum 24, 3 displacement mapping. In Proceedings of the 2000 Eu-
(2005), 695–704. rographics Workshop on Rendering Techniques (2000),
[SKE05] S CHEIN S., K ARPEN E., E LBER G.: Real- pp. 257–268.
time geometric deformation displacement maps using [WSP04] W IMMER M., S CHERZER D., P URGATHOFER
programmable hardware. The Visual Computer 21, 8–10 W.: Light space perspective shadow maps. In Eurograph-
(2005), 791–800. ics Symposium on Rendering (2004), pp. 143–151.
[SSS00] S MITS B. E., S HIRLEY P., S TARK M. M.: Direct [WTL∗ 04] WANG X., T ONG X., L IN S., H U S., G UO B.,
ray tracing of displacement mapped triangles. In Proceed- S HUM H.-Y.: Generalized displacement maps. In Pro-
ings of the Eurographics Workshop on Rendering Tech- ceedings of the 2004 Eurographics Symposium on Ren-
niques 2000 (2000), Springer-Verlag, pp. 307–318. dering (2004), pp. 227–234.
[ST90] S HIRLEY P., T UCHMANN A.: A polygonal ap- [WWT∗ 04] WANG L., WANG X., T ONG X., L IN S., H U
proximation to direct scalar volume rendering. ACM S., G UO B.: View-dependent displacement mapping.
Computer Graphics 24 (1990), 63–70. ACM Transactions on Graphics 22, 3 (2004), 334–339.
[SYL02] SYLVAIN P.: A survey of methods for recover- [YJ04] Y EREX K., JAGERSAND M.: Displacement map-
ing quadrics in triangle meshes. ACM Computing Surveys ping with ray-casting in hardware. In Siggraph 2004
34, 2 (2002), 1–61. Sketches (2004).
[Tai92] TAILLEFER F.: Fast inverse displacement map- [ZTCS99] Z HANG R., T SAI P.-S., C RYER J. E., S HAH
ping and shading in shadow. In Graphics Interface ’92 M.: Shape from shading: A survey. IEEE Transactions on
Workshop on Local Illumination (1992), pp. 53–60. Pattern Analysis and Machine Intelligence 21, 8 (1999),
[Tat06a] TATARCHUK N.: Dynamic parallax occlusion 690–706.