Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - Vector mathematics
- - Quaternions
- - Planes
- - 2D polygon (TRIANGLE) rendering
- - With texture mapping
- - With perspective correction
- - Multi-sided polygon rendering
- - Tesselation
- - Viewport
- - Frustum, created from 2D edgepoints
- - Pixel buffer (float vectors)
- - Z buffer
- - Prespective projection algorithms
- - 3D polygon rendering
- - Discard polygons that are facing opposite way
- - Clip against view frustum (set of planes)
- - Prespective projection
- - Scene rendering, part 1
- - Go through all polygons in the current sector
- - Project and clip
- - If the polygon is a portal, recurse using the 2D points as a frustum
- - If the polygon is not a portal, add it to one of the four draw-lists
- - Sort draw-lists: 0 = non-overlapping polygons (classic portal rendering), no sorting;
- 1 = Z-buffer polygons, nearest first
- 2 = Translucent polygons, farthest first
- 3 = Overlay polygons, farthest first
- - For each multi-sided polygon in the draw-list, render them.
- - Scene rendering, part 2: Projection
- - Compose the pixel map from carefully selected and cropped view plates
- - Each view plate is rendered as in part 1
- - Final step: HDR
- - Calculate brightness value for each pixel using current GlobalBrightness
- - Calculate an overall illumination value using a weighted average of the per-pixel brightness values
- - Adjust the GlobalBrightness using this illumination value
- - Calculate the average difference between brightness of previous and current frame
- - Calculate an “aggressivity” value using that difference
- - Calculate a per-pixel “ideal brightness” value, using current brightness, current overall illumination value and aggressiveness
- - Create two blurred-down versions of the per-pixel “ideal brightness” maps
- - Create a per-pixel brightness target map using a weighted average of previous frame brightness target map and the three “ideal brightness” maps
- - Render the picture by multiplying original pixels with the per-pixel brightness map and the GlobalBrightness; clamping with saturation and rendering with dithering.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement