Documente Academic
Documente Profesional
Documente Cultură
view
view view view
view view view
view
view view
view
/ 1
1
/
1
/ 1/ 0 1
1
x
z d x x
y y y
z d
z z
d z d d
(
(
( ( (
(
( ( (
(
( ( (
=
(
( ( (
(
( ( (
(
(
Perspective Distortion
screen
-z
y
z
view
y
view
1
y
clip
view
clip
view
y
y
z
=
view
view
view view
view
view view
view
view view
view
view
1
1
1 0 1
1
x
z
x x
y
y y
z
z z
z
z
o | o |
|
o
(
(
(
( ( (
(
( ( (
(
( ( (
=
(
+ ( ( (
(
( ( (
(
(
(
Distorted z-Values
view
clip
view
y
y
z
=
view
view
view view
view
view view
view
view view
view
view
1
1
1 0 1
1
x
z
x x
y
y y
z
z z
z
z
o | o |
|
o
(
(
(
( ( (
(
( ( (
(
( ( (
=
(
+ ( ( (
(
( ( (
(
(
(
-z
-o |/z
-o
1/-z curve
z
1
z
2
-o |/z
2
-o |/z
1
if z
1
> z
2
then
-o |/z
1
> -o |/z
2
Normalized Perspective Distortion
2 near right left
right left right left
2 near top bottom
top bottom top bottom
far near 2 far near
far near far near
1 0
+
(
(
(
+
(
(
(
+
(
(
(
x
y
z
x
y
z
(0,0,-far)
(-1,1,1)
z
1 -1
x
1
-1
y
-1
1
Hierarchical Z-Buffer
Invented by Ned Green in 1994
Creates a MIP-map of the z-buffer
z-value equal to farthest z-value of
its four children
Before rasterizing a triangle
Check z-value of its nearest vertex
against z-value of the smallest
quadtree cell containing the triangle
If z-test fails, then the entire
triangle is hidden and need not be
rasterized
Works best when displaying
front-to-back
-.2
-.3
-.4
-.5
-.6
-.7
-.8
-far
f
r
a
m
e
b
u
f
f
e
r
hierarchical zbuffer
-.3
-.5
-.7
-far
-.5
-far
-far