Skip to Main Content
3D Game Engine Design, 2nd Edition
book

3D Game Engine Design, 2nd Edition

by David Eberly
November 2006
Intermediate to advanced content levelIntermediate to advanced
1040 pages
26h 31m
English
CRC Press
Content preview from 3D Game Engine Design, 2nd Edition
20.10 Planar Reflection 937
// See comment (5) after source code.
reverse the culling direction;
// See comment (6) after source code.
draw node subtree with culling disabled;
restore the cull direction;
disable extra clip plane;
disable the postworld transformation;
// See comment (7) after source code.
enable alpha blending;
set blending color to (r,g,b,a) = (0,0,0,reflectance);
disallow alpha state changes;
render the plane;
allow alpha state changes;
disable alpha blending;
}
disable stencil buffering;
disable depth buffering;
draw the node subtree;
The steps of the pseudocode are as follows:
1. Render the reflecting plane into the stencil buffer. No pixels are written to the
depth buffer or color buffer, but we use depth buffer testing so that the stencil
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

3D Game Engine Architecture

3D Game Engine Architecture

David Eberly
Blender 3D By Example - Second Edition

Blender 3D By Example - Second Edition

Oscar Baechler, Xury Greer
Computer Graphics

Computer Graphics

Alexey Boreskov, Evgeniy Shikin

Publisher Resources

ISBN: 9781482267303