Docsity

Chapter_19_Computer_Graphics_and_Rendering_Pipelines, Lecture notes of Computer Fundamentals

Toggle sidebar
bg1
AP PL IED CO MPU TI NG • CH AP TER 1 9
Computer Graphics & Rendering Pipelines
3D Coordinate Spaces, Rasterization vs. Ray Tracing, Shaders & Frame Buffers
1. The 3D-to-2D Transformation Pipeline
Rendering converts 3D virtual scenes made of triangle meshes into a 2D grid of colored pixels on a display.
Figure 19.1 — Programmable GPU Real-Time Graphics Pipeline
Vertex Shader: Multiplies 3D model vertices by Model, View, and Projection (MVP) matrices to map objects onto camera
screen space.
Rasterization: Determines which discrete screen pixels (fragments) lie inside each projected triangle.
Fragment (Pixel) Shader: Computes final pixel color using textures, surface normals, and lighting models (e.g., Phong or
PBR ).
2. Rasterization vs. Ray Tracing
Technique Core Mechanism Best Used For
Rasterization Projects 3D triangles onto a 2D plane using matrix
math
High-FPS real-time games & mobile UIs
Ray Tracing Simulates physical light rays bouncing off surfaces Photorealistic reflections, soft shadows & global
illumination
3. Depth Testing & Double Buffering
Z-Buffer (Depth Buffer): Stores the distance from the camera for every pixel so foreground objects automatically occlude
objects behind them.
Double Buffering: The GPU draws the next frame into a hidden back buffer while the monitor reads the front buffer,
preventing horizontal screen tearing.
Vertex Shader
Rasterization
Fragment Shader
Framebuffer
•
•
•
•
•

Partial preview of the text

Download Chapter_19_Computer_Graphics_and_Rendering_Pipelines and more Lecture notes Computer Fundamentals in PDF only on Docsity!

AP PLIED COMPUTING • CH AP T ER 19

Computer Graphics & Rendering Pipelines

3D Coordinate Spaces, Rasterization vs. Ray Tracing, Shaders & Frame Buffers

1. The 3D-to-2D Transformation Pipeline

Rendering converts 3D virtual scenes made of triangle meshes into a 2D grid of colored pixels on a display.

Figure 19.1 — Programmable GPU Real-Time Graphics Pipeline

Vertex Shader: Multiplies 3D model vertices by Model, View, and Projection (MVP) matrices to map objects onto camera screen space. Rasterization: Determines which discrete screen pixels (fragments) lie inside each projected triangle. Fragment (Pixel) Shader: Computes final pixel color using textures, surface normals, and lighting models (e.g., Phong or PBR ).

2. Rasterization vs. Ray Tracing

Technique Core Mechanism Best Used For Rasterization Projects 3D triangles onto a 2D plane using matrix math

High-FPS real-time games & mobile UIs

Ray Tracing Simulates physical light rays bouncing off surfaces Photorealistic reflections, soft shadows & global illumination

3. Depth Testing & Double Buffering

Z-Buffer (Depth Buffer): Stores the distance from the camera for every pixel so foreground objects automatically occlude objects behind them. Double Buffering: The GPU draws the next frame into a hidden back buffer while the monitor reads the front buffer, preventing horizontal screen tearing.

Vertex Shader Rasterization Fragment Shader Framebuffer