graphics pipeline Flashcards
(31 cards)
What is the graphics pipeline?
A sequence of stages that transforms 3D models into 2D images for display.
What are the main stages of the graphics pipeline?
Vertex processing, clipping & rasterisation, fragment processing, and framebuffer processing.
What is the goal of vertex processing?
Transform vertex positions and compute lighting and shading at the vertex level.
What are vertex normals used for?
For smooth shading and lighting calculations.
What happens during clipping?
Geometry outside the view frustum is discarded.
What is back-face culling?
A technique to discard triangles facing away from the camera.
What is the dot product used for in back-face culling?
To determine if a surface normal faces the camera using n · v.
What is rasterisation?
The process of converting primitives like triangles into pixel fragments.
What is a fragment in the graphics pipeline?
A data structure representing a potential pixel with information like colour and depth.
What does fragment processing involve?
Computing the final colour and depth for each fragment, often including lighting and texturing.
What are the three lighting models used in fragment shading?
Flat shading, Gouraud shading, and Phong shading.
What is flat shading?
A single colour per triangle based on one normal.
What is Gouraud shading?
Lighting is computed at vertices and interpolated across the surface.
What is Phong shading?
Interpolated normals are used to compute lighting per pixel for smoother results.
What is texture mapping?
Applying a 2D image onto a 3D surface using UV coordinates.
What is UV unwrapping?
Mapping 3D geometry to 2D texture space for accurate texture application.
How is a texture applied in Three.js?
Using a texture loader and setting it as a map in the material.
What is the framebuffer?
A memory buffer that holds the final rendered image, including colour and depth.
What is depth testing?
A process to determine which fragment is closest to the camera and should be rendered.
What is alpha blending?
Combining fragment transparency with background colours for translucent effects.
What is hidden surface removal?
Techniques to ensure only visible surfaces are rendered.
What is the painter’s algorithm?
A method that draws objects from back to front to simulate visibility.
What is the drawback of the painter’s algorithm?
It can fail with overlapping geometry and is inefficient due to overdraw.
What is the Z-buffer method?
Stores per-pixel depth and compares incoming fragment depths to determine visibility.