Real-Time Rendering (2nd Edition)

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ECE 595 / CS 491 / CS 591 Real-Time Rendering & Graphics Hardware Pradeep Sen Advanced Graphics Lab Class 5 January 31, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 5 – January 31, 2007 Pop-quiz! Real-time Rendering & Graphics Hardware Pradeep Sen Class 5 – January 31, 2007 Last time Application-side optimizations Bounding box hierarchy BSP Trees Started talking about cells and portals Real-time Rendering & Graphics Hardware Pradeep Sen Class 5 – January 31, 2007 Today More on portals More occlusion testing Scene graphs Laying down the foundation of a rendering engine Real-time Rendering & Graphics Hardware Pradeep Sen Class 5 – January 31, 2007 Cells and portals example A B C D E F G Real-time Rendering & Graphics Hardware Pradeep Sen Class 5 – January 31, 2007 Room drawing algorithm void drawRoom(Room *room, Clip planes) { if (room->visited) return; // this room has been drawn room->visited = true; for each portal in room { if isVisible(portal) { new_planes = clipPortal(planes, portal->clipPlanes); drawRoom(portal->room, new_planes); } } draw(room->walls, planes); draw(room->objects, planes);
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.