Algorithm Search⌘K

Real-time rendering

Problems

  • Order-independent transparency

    Composite the transparent fragments of each pixel as if they were blended in depth order with the over operator, when the rasterizer delivers them in an arbitrary order.

    core
  • Tone mapping

    Map the high dynamic range luminances of a rendered or captured image to the small range of a display, with a global curve or a local operator, while keeping contrast and detail visible.

    core

Algorithms

  • Cascaded shadow maps

    Split the view frustum into depth ranges and render one shadow map per range, so that shadow resolution follows the distance to the eye.

    Θ(m N^2 + m t + P + q) worst1 languagescore
  • Percentage-closer filtering

    Soften shadow map edges by comparing several depth samples near the lookup point with the receiver depth and averaging the binary results.

    Θ(q k) worst1 languagescore
  • Perlin noise

    A smooth pseudorandom function made by interpolating random gradients at the points of an integer lattice with a quintic fade curve.

    Θ(q n 2^n) worst1 languagescore
  • Reinhard tone mapping operator

    Scale luminance so that the log average maps to a key such as 0.18, then compress it with L/(1+L) or a white point curve. An optional local step adds dodging and burning.

    Θ(p) global1 languagescore
  • S3 texture compression

    Code each 4x4 block of texels in 64 bits, as two 16-bit endpoint colors and a 2-bit index per texel into the line between them, for 4 bits per texel and random access on the GPU.

    Θ(N) worst1 languagescore
  • Screen-space ambient occlusion

    Estimate ambient occlusion per pixel by testing sample points around it against the depth buffer, then blur the noisy result.

    O(p s + p r^2) worst1 languagescore
  • Worley noise

    A procedural texture basis whose value is the distance to the nearest, or the k-th nearest, of random feature points scattered in cells.

    O(q (1 + k/λ + (λ + k) k)) expected1 languagescore
  • Adaptive scalable texture compression

    A block texture format with 128 bits per block for footprints from 4x4 to 12x12 texels, whose color endpoints and weights are packed with trits, quints and bits by integer sequence coding.

    Θ(N) worst1 languagesadvanced
  • Clustered shading

    Group pixels into clusters by screen tile and exponential depth slice, keep a light list for each occupied cluster, and shade each pixel with the lights of its cluster.

    O(t l) assignment1 languagesadvanced
  • Horizon-based ambient occlusion

    March the depth buffer in several screen directions to find the horizon angle in each, and integrate the visible part of the hemisphere.

    O(p m s) worst1 languagesadvanced
  • Parallax occlusion mapping

    March the view ray through a height field in texture space to find the first intersection, giving parallax and self-occlusion per pixel.

    Θ(P k) worst1 languagesadvanced
  • Per-pixel linked list transparency

    Append every transparent fragment to a linked list per pixel on the GPU with an atomic counter, then sort and blend each list in a resolve pass.

    O(p k^2) worst1 languagesadvanced
  • Percentage-closer soft shadows

    Estimate the penumbra width from the average blocker depth found in the shadow map and use it as the kernel size of percentage-closer filtering.

    Θ(q (m + k)) worst1 languagesadvanced
  • Precomputed atmospheric scattering

    Precompute transmittance and single and multiple Rayleigh and Mie scattering into 2D and 4D tables, so that sky and aerial perspective render from any altitude with a few lookups.

    Θ(q) single_scattering_ray1 languagesadvanced
  • ROAM

    Keep a terrain triangulation as a binary triangle tree and split and merge triangles with two priority queues to meet an error bound each frame.

    O((L + s) log(L + s)) worst1 languagesadvanced
  • Screen-space reflections

    March the reflected ray through the depth buffer in screen space, perspective correct, and reuse the shaded color at the hit. Off-screen and hidden surfaces fall back to an environment map.

    O(p n) worst1 languagesadvanced
  • Simplex noise

    Gradient noise summed over the n + 1 corners of the simplex that holds the point, which costs O(n^2) instead of O(n 2^n) in n dimensions.

    Θ(q n^2) worst1 languagesadvanced
  • Spherical harmonic irradiance environment map

    Nine spherical harmonic coefficients give the diffuse irradiance of a distant environment as E(n) = n^T M n. The error is at most 3/32 (about 9%) of the total light, and under 3% on average.

    Θ(s) build1 languagesadvanced
  • Tiled shading

    Cut the screen into tiles, keep for each tile the lights whose volume can reach its frustum between the nearest and farthest depth, and shade each pixel with the lights of its tile only.

    O(p l) worst1 languagesadvanced
  • Variance shadow maps

    Store depth and squared depth, filter them like a texture, and bound the fraction of light by Chebyshev's inequality on the local depth distribution.

    Θ(w h + q) worst1 languagesadvanced
  • View-dependent refinement of progressive meshes

    Refine or coarsen a progressive mesh locally by legal vertex splits and edge collapses, driven by the view frustum, the surface orientation and screen-space error.

    O(a + s N) worst1 languagesadvanced
  • Weighted blended order-independent transparency

    Approximate the over operator by a weighted average of the transparent colors with depth-based weights, computed in one pass with additive blending.

    O(f + p) frame1 languagesadvanced
  • Ground-truth ambient occlusion

    A horizon-based screen-space method that integrates cosine-weighted visibility in closed form per slice. Its match with ray traced AO is a measurement, for one depth layer only.

    O(p m s) worst1 languagesresearch
  • Moment shadow mapping

    Store four power moments of depth and compute the sharp lower bound on the occluded fraction, an upper bound on the lit fraction with less light leaking than variance shadow maps.

    Θ(w h + q) worst1 languagesresearch

Data structures

  • Cube map

    Six square textures on the faces of a cube that store a function of direction. A lookup picks the face of the largest component of the direction and divides the other two by it.

    Θ(n^2) fill1 languagesintro
  • G-buffer

    A set of screen-sized images that stores, per pixel, the depth and the surface attributes of the nearest surface, such as the normal, the base color and the roughness, for a later shading pass.

    Θ(p m b) clear1 languagescore
  • Geometry clipmaps

    Render terrain as nested regular grids centered on the viewer. Each coarser level has half the resolution of the level inside it, and the levels update incrementally as the viewer moves.

    Θ(L n^2) build · mesh1 languagesadvanced
  • Irradiance volume

    A 3D grid of light probes that store the incoming irradiance by direction, interpolated to light moving objects with baked global illumination.

    Θ(n) bake1 languagesadvanced
  • Texture clipmap

    A mipmap whose finer levels are clipped to a fixed-size window around the viewer, so that very large textures fit in a bounded memory.

    Θ(C^2 (1 + log(N/C))) build1 languagesadvanced

Techniques

  • Billboard

    Draw a textured quad that is rotated each frame to face the camera, used for particles, foliage and distant objects.

    intro
  • Bump mapping

    Perturb the shading normal by the gradient of a height texture, so that a flat surface looks wrinkled without changing its geometry.

    intro
  • Environment mapping

    Approximate reflections by looking up the reflected direction in a texture that stores the distant surroundings as a function of direction.

    intro
  • Light mapping

    Precompute the lighting of static surfaces into a second texture with a unique parameterization and modulate the surface texture by it at run time.

    intro
  • Normal mapping

    Store surface normals in a texture, usually in tangent space, and use them in place of the interpolated normal when shading.

    intro
  • Toon shading

    Quantize the diffuse term to a few flat bands through a one-dimensional ramp texture and draw dark silhouettes, to look like hand-drawn cartoons.

    intro
  • Deferred shading

    Draw the scene once to store the surface attributes of the visible surface at each pixel, then compute the lighting per pixel from these stored values, so each light is applied once per visible pixel.

    core
  • Displacement mapping

    Move the vertices of a finely tessellated surface along their normals by a height texture, so that the relief changes the geometry and silhouette.

    core
  • Fractal Brownian motion noise

    Sum octaves of a noise function, each with doubled frequency and reduced amplitude, to get a self-similar texture for terrain, clouds and marble.

    1 languagescore
  • Image-based lighting

    Light a scene with a captured high dynamic range image of the real surroundings, treating each texel as a distant light source.

    core
  • Impostor

    Replace a distant complex object by an image of it rendered to a texture and drawn on a quad, refreshed when the view changes enough.

    core
  • Parallax mapping

    Shift the texture coordinates along the view direction by the height read from a height map, to fake the parallax of surface relief.

    core
  • Schlick's Fresnel approximation

    Approximate the Fresnel reflectance by F0 + (1 - F0)(1 - cos theta)^5, where F0 is the reflectance at normal incidence. It is exact at 0 and 90 degrees and off by a few hundredths between.

    1 languagescore
  • Geomorphing

    Interpolate the vertex positions between two levels of detail over several frames so that switching levels causes no visible pop.

    1 languagesadvanced
  • Spherical harmonic lighting

    Project lighting and transfer functions onto low-order spherical harmonics, so that integrals over the sphere become dot products of coefficients.

    advanced
  • Split sum approximation

    Split the specular image-based lighting integral into a prefiltered environment map and a precomputed two-dimensional BRDF table.

    advanced
  • Virtual texturing

    Page fixed-size tiles of a huge texture into a physical cache on demand, using a feedback pass and an indirection table, like virtual memory.

    advanced
  • Linearly transformed cosines

    Shade with polygonal area lights in real time by fitting each BRDF lobe as a clamped cosine distribution under a 3x3 linear transform.

    research
  • Precomputed radiance transfer

    Precompute how each point of a static object transfers low-frequency incident light, including shadows and interreflection, in a spherical harmonic basis.

    research
  • Visibility buffer

    A deferred method that stores only the triangle and instance id of the visible surface per pixel, and computes the attributes and their derivatives again from the vertex data when it shades.

    research

Concepts

  • Level of detail

    Draw an object with a simpler representation when it covers few pixels, choosing among versions by distance, screen size or error.

    intro
  • Physically based shading

    Shading with reflectance models that aim to obey reciprocity and energy conservation, such as microfacet BRDFs, so that one set of material parameters works under all lights.

    core

Models

  • Blinn-Phong reflection model

    An empirical reflection model that adds ambient, diffuse and a specular lobe built on the half vector between the light and view directions.

    1 languagesintro
  • GGX microfacet distribution

    The density of microfacet normals D(h) = alpha^2 / (pi ((n.h)^2 (alpha^2 - 1) + 1)^2), normalized over projected area. It has a sharp peak and a long tail, and is the usual D of microfacet BRDFs.

    1 languagescore
  • Gooch shading

    A non-photorealistic shading model for technical illustration that varies hue from cool to warm with the surface orientation instead of brightness.

    core
  • Disney principled BRDF

    A BRDF with a few intuitive parameters such as base color, metallic and roughness that blends diffuse, specular, sheen and clearcoat lobes.

    1 languagesadvanced
  • Oren-Nayar reflectance model

    A diffuse model for rough surfaces made of Lambertian V-cavity facets. Compared with Lambert, it scatters more light back toward the light source and gives rough objects a flatter look.

    1 languagesadvanced
  • Preetham sky model

    An analytic model of daylight sky radiance as a function of sun position, view direction and turbidity, fitted to simulated scattering.

    advanced
  • Smith masking-shadowing function

    The G factor of a microfacet BRDF. It assumes facet heights and normals are uncorrelated and gives G1 = 1/(1+Lambda), with a closed form for GGX and a separable and a height-correlated G2.

    1 languagesadvanced