If you have ever stopped mid-game to admire golden sunbeams slicing through a cathedral window, dust motes drifting in a lantern-lit corridor, or an eerie fog rolling across a battlefield at dawn, you have already witnessed the power of volumetric lighting. It is the rendering technique responsible for the most cinematic and emotionally resonant visuals in modern games, transforming flat surfaces into living, breathing atmospheres that pull players deeper into the world.
Volumetric lighting, also known as volumetric fog, participating media rendering, or atmospheric scattering, is a rendering approach that models the behavior of light as it travels through a medium that scatters and absorbs photons. Rather than treating a scene as a collection of opaque surfaces, volumetric techniques consider the space between those surfaces, allowing light beams, crepuscular rays, and soft shadowing inside fog or dust to appear convincingly realistic. Whether you are a graphics programmer optimizing a AAA title, a technical artist crafting mood in an indie project, or a student preparing for a rendering interview, understanding volumetric lighting is essential for creating visuals that feel truly immersive.
Key Takeaways
1. Volumetric lighting simulates light scattering through participating media (fog, dust, smoke), enabling visible light shafts, god rays, and atmospheric depth that surface-only rendering cannot achieve.
2. The radiative transfer equation governs the physics, but real-time engines approximate it using extinction, scattering phase functions (like Henyey-Greenstein), and in-scattering calculations balanced for performance.
3. Implementation ranges from cheap screen-space passes (SSVL) to high-quality raymarching and voxel grid methods; the right choice depends on your target hardware, scene scale, and visual fidelity goals.
Volumetric Lighting Explained
4. Performance optimization is critical: use half-resolution rendering, temporal accumulation, importance sampling, and bilateral upsampling to keep volumetric passes under 2-3ms on console-class hardware.
5. Volumetric shadows and integration with particle systems, weather, and post-processing are what separate a convincing atmosphere from a flat fog layer; both require careful energy-conserving pipelines.
What Is Volumetric Lighting?

At its core, volumetric lighting is the simulation of how light behaves when it passes through a medium that is not perfectly transparent. In the real world, air is filled with tiny particles: water droplets, dust motes, pollen, and pollutants. When a beam of light travels through this soup of particles, two fundamental things happen. Some photons are absorbed or scattered out of the beam, a process called extinction. Other photons from different directions are scattered into the path of the beam, a process called in-scattering. The net result is that the light beam itself becomes visible to an observer, creating the shafts of light we commonly call god rays, crepuscular rays, or Tyndall beams.
In traditional forward or deferred rendering pipelines, the space between surfaces is treated as empty. A pixel shader computes the color of a surface, and that color travels directly to the camera without any consideration of what lies in between. This approach works beautifully for clear, dry environments but fails completely when you need fog, smoke, dust, or atmospheric haze. Volumetric lighting fills this gap by modeling the participating media that fills the space between the camera and the surfaces in your scene, allowing light to scatter, absorb, and accumulate in ways that match our real-world experience.
The visual payoff is substantial. Volumetrics add depth cues that help players judge distance in foggy environments. They enhance silhouettes, making objects stand out against bright atmospheric backgrounds. They provide cinematic mood that can shift the emotional tone of a scene from ominous to awe-inspiring. For gameplay, volumetric lighting can guide player attention toward objectives or away from dangers, and it improves readability in complex scenes where flat lighting would leave important elements camouflaged.
Why Volumetric Lighting Matters for Modern Games
Modern players expect a level of visual fidelity that goes beyond texture resolution and polygon count. Atmospheric effects are a key differentiator between a game that looks competent and one that feels truly next-generation. Titles like Horizon Forbidden West, The Last of Us Part II, and Cyberpunk 2077 all leverage sophisticated volumetric systems to create environments that feel alive. In each case, the volumetric lighting is not merely decorative; it serves narrative and gameplay purposes by establishing mood, reinforcing environmental storytelling, and providing visual cues that flat fog cannot deliver.
The Physics Behind Volumetric Lighting
The mathematical foundation of volumetric lighting is the radiative transfer equation (RTE), which describes how radiance changes along a ray as it passes through a participating medium. The full RTE accounts for emission, absorption, out-scattering, and in-scattering, and it is the governing equation for everything from stellar atmospheres to underwater optics. In real-time rendering, we rarely solve the full equation. Instead, we work with simplified models that capture the most visually important phenomena while remaining computationally tractable on GPU hardware.
Extinction, Scattering, and Phase Functions
Three key physical quantities define how light interacts with a participating medium. Extinction, denoted by the Greek letter sigma-t, represents the total rate at which light is removed from a beam due to both absorption and out-scattering. The higher the extinction coefficient, the faster the beam diminishes as it travels through the medium. In practical terms, extinction controls how far you can see through fog: high extinction means short visibility, low extinction means long visibility.
The scattering phase function, typically denoted p, controls the angular distribution of scattered light. It answers the question: when a photon hits a particle, in which direction is it most likely to bounce? The simplest phase function is isotropic scattering, where light is equally likely to scatter in any direction. However, most real-world media exhibit forward scattering, meaning photons tend to continue roughly in their original direction after interacting with a particle. The most common phase function in game rendering is the Henyey-Greenstein phase function, which provides a single parameter, g, that controls how strongly forward-scattering the medium is. A g value of 0 produces isotropic scattering, while values approaching 1 produce extreme forward scattering with a bright central peak.
In-scattering is the process by which light from other directions is redirected into the ray traveling toward the camera. This is what makes light beams visible: without in-scattering, a foggy scene would simply look dim and flat. In-scattering collects light from all directions (weighted by the phase function and the positions of light sources) and adds it to the radiance arriving at the camera. Real-time engines typically approximate in-scattering by considering only single scattering (direct contributions from light sources) and then adding a broad, diffuse term to simulate the softening effect of multiple scattering events without paying the full computational cost.
The Henyey-Greenstein Phase Function in Practice
The Henyey-Greenstein phase function was originally developed in 1941 to model diffuse galactic light in astrophysics. Its simplicity and controllability have made it the standard choice in real-time volumetric rendering. The parameter g ranges from -1 (complete backward scattering) through 0 (isotropic) to +1 (complete forward scattering). Most atmospheric media in games use g values between 0.5 and 0.95, creating the bright forward-scattered glow that makes sunbeams look convincing. However, excessive forward scattering can cause visual problems: when g is too high, light wraps tightly around objects and fails to reveal surface details, making silhouettes look muddy. Experienced technical artists tune g per light source, using lower values for point lights and higher values for the sun.
Volumetric Lighting Implementation Techniques

There is no single right way to implement volumetric lighting. The technique you choose depends on your target platform, the scale of your environments, your performance budget, and the level of physical accuracy you require. The following approaches represent the spectrum from cheapest to highest quality, each with distinct trade-offs.
Screen-Space Volumetric Lighting (SSVL)
Screen-space volumetric lighting reconstructs depth and world positions from the depth buffer, then integrates lighting along view rays directly in screen-space. This approach is efficient because it reuses the already-rendered scene depth and typically runs as a single fullscreen post-process pass. NVIDIA popularized this technique in GPU Gems 3, Chapter 13, demonstrating how a radial blur in image space can simulate volumetric light scattering at remarkably low cost. SSVL handles single scattering well and is well-suited for medium-scale fog and local light shafts where the camera is inside or near the fog volume.
However, screen-space methods have fundamental limitations. They cannot see occluders that are off-screen, which means god rays can appear or disappear as the camera pans past a blocking object. They can also suffer from missing geometry where the depth buffer has holes or where depth reconstruction fails, leading to light leaking in unexpected areas. Despite these limitations, SSVL remains a popular choice for mobile and lower-end platforms where a full volumetric integration would be prohibitively expensive.
Voxel and Grid Volume Methods
Voxel-based approaches rasterize or compute volumetric density into a 3D grid that covers the camera frustum or the entire scene. This grid can be sparse (using clipmaps or tiled 3D textures) or dense, depending on the scale of the environment. The Frostbite engine’s unified volumetric rendering system popularized this approach in AAA games, using a froxel grid that aligns with the camera frustum to evaluate scattering at every point in the visible volume. Grid methods support multiple scattering approximations, shadow propagation, and temporal reuse, making them suitable for large-scale environmental fog and localized volumetric effects like smoke and clouds.
The primary challenge with grid volumes is memory and update strategy. A dense 3D texture at full resolution would consume enormous bandwidth, so engines use lower resolutions (typically 1/4 or 1/8 of screen resolution) and rely on bilateral upsampling or temporal accumulation to reconstruct detail. Sparse representations like clipmaps help scale to open-world environments where fog density varies dramatically across the scene. The key engineering decision is choosing the right grid resolution and update frequency to balance visual quality against GPU memory and compute costs.
Raymarching Through Volumes
Raymarching is the most direct and flexible approach to volumetric lighting. The algorithm traces rays from the camera through the scene, stepping through the volume at regular or adaptive intervals, accumulating extinction and in-scattering at each sample point. Raymarching provides the highest quality results, supporting anisotropic phase functions, self-shadowing, and complex density distributions that grid methods struggle to represent. Tutorials like the volumetric ray marcher guide by Ryan Brucks demonstrate how to build a basic ray marcher in Unreal Engine, providing an excellent starting point for developers new to the technique.
The cost of raymarching scales directly with the number of samples per ray and the number of pixels that contain volumetric content. At high resolutions, this can become prohibitively expensive, which is why practical implementations rely on a suite of optimizations. Adaptive step sizes reduce the number of samples in low-density regions. Early exit terminates a ray when accumulated opacity reaches near-maximum. Temporal accumulation distributes samples across multiple frames, reducing per-frame cost at the expense of a slight motion-blur artifact that must be managed through history validation. Hierarchical volumes allow coarse sampling in distant regions and fine sampling near the camera.
Deep Opacity Maps and Particle-Based Approaches
Deep opacity maps and deep shadow maps store depth-resolved opacity along light directions, enabling efficient approximation of light scattering within volumes. Originally introduced in the seminal Deep Shadow Maps paper by Lokovic and Veach at SIGGRAPH 2000, these techniques capture volumetric occlusion from the light’s perspective with multiple depth layers. They are particularly effective for directional lights like the sun, where a single shadow representation can be reused across the scene. Later adaptations like Adaptive Volumetric Shadow Maps (AVSM) brought this approach to real-time GPU rendering.
Particle-based approaches render fog sprites or billboards that contribute to volume density. This method is artist-friendly and computationally cheap for localized effects like campfire smoke or spell effects, but it lacks the continuity and self-shadowing of volumetric grids. In practice, many engines combine particle-based effects with grid or raymarched volumetrics, using particles for small, dynamic effects and grids for the global atmosphere.
Volumetric Shadows and Occlusion

Volumetric shadows, the soft shadowing of light as it passes through a volume, are what separate a convincing volumetric effect from a flat, unrealistic fog layer. Without volumetric shadows, light beams appear to shine through solid objects, destroying the illusion of physical reality. With them, god rays are naturally occluded by buildings, trees, and characters, creating the dramatic light-and-shadow patterns that define cinematic atmosphere.
Shadow-Mapped Integration
The most common approach to volumetric shadowing uses the light’s existing shadow map to determine which parts of the volume are in shadow. During the raymarching or grid integration pass, each sample point is projected into the light’s shadow map. If the sample is in shadow, its in-scattering contribution is reduced or eliminated. For directional lights, this is straightforward because a single shadow map covers the entire scene. For point lights and spotlights, multiple shadow maps may be needed, which increases the cost proportionally. The main limitation is that standard shadow maps only capture surface occlusion; they do not account for the density of the volumetric medium itself blocking light.
Deep Shadow Maps for Volume Self-Shadowing
Deep shadow maps extend the concept by storing not just a single depth value per pixel but a full transmittance function that records how much light is blocked at each depth along the light ray. This allows the volumetric medium itself to cast shadows on other parts of the volume, creating self-shadowing effects like smoke casting shadows on smoke. The original deep shadow maps paper and its real-time successor, Adaptive Volumetric Shadow Maps (AVSM), demonstrate how to compress this transmittance function into a fixed number of layers for GPU-friendly evaluation. These techniques are essential for convincing smoke and cloud rendering where the volume must shadow itself to look realistic.
Density-Aware Shadowing in Voxel Grids
When using voxel grid methods, shadowing can be computed by propagating light through the grid itself. Starting from the light source, the engine steps through grid cells along the light direction, accumulating extinction to determine how much light reaches each cell. This naturally accounts for varying density within the volume and produces soft, physically plausible shadows. The cost is proportional to the grid resolution and the number of light sources, but the results are often more convincing than shadow-map-based approaches because the shadowing is consistent with the volume’s density distribution. The key challenge is ensuring temporal stability when density changes rapidly, which requires careful history validation and clamping strategies.
Performance Optimization and Profiling

Volumetric rendering is often one of the most expensive visual features in a game’s rendering pipeline. The reason is simple: it multiplies shading work by the number of samples taken along each ray or the resolution of the volumetric grid. A scene that costs 4ms to render without volumetrics might cost 8-12ms with a naive volumetric pass, effectively halving your frame rate. This section covers the optimization strategies that make volumetric lighting practical in production.
Resolution and Sample Count Strategies
The single most impactful optimization is reducing the resolution of the volumetric buffer. Running the volumetric pass at half or even quarter screen resolution dramatically reduces the number of pixels that need to be shaded while still producing visually convincing results when upsampled with a bilateral filter that respects depth discontinuities. Temporal accumulation further reduces the per-frame sample count by distributing samples across multiple frames and reprojecting previous results. The trade-off is that rapidly moving cameras or fast-changing density can cause ghosting artifacts, which must be mitigated through robust history validation, velocity-aware rejection, and per-pixel clamping of accumulated values.
Sample count per ray is another critical lever. A raymarched volumetric pass might use 64 or 128 samples per pixel for high quality, but production engines often reduce this to 32 or even 16 samples by using adaptive step sizes and importance sampling. Importance sampling concentrates samples where light contributions are strongest, typically near the primary directional light, and uses fewer samples in shadowed or low-contribution regions. This approach can reduce sample count by 50% or more with minimal visual impact.
Memory Bandwidth and Temporal Reuse
Grid volumes and deep shadow maps can place significant pressure on GPU memory bandwidth, particularly at high resolutions. Compressed 3D textures, clipmaps that load only the relevant portion of the volume, and careful data layout all help reduce bandwidth consumption. Temporal reuse, where scattering results from previous frames are reprojected and blended with the current frame, is one of the most effective techniques for reducing per-frame cost. The Volumetric ReSTIR technique introduced at SIGGRAPH Asia 2021 demonstrates how spatiotemporal reservoir resampling can achieve interactive frame rates for volumetric path tracing with multiple scattering, representing the current state of the art in real-time volumetric sampling.
Profiling Tools and Metrics
Effective optimization requires measurement. RenderDoc is the go-to free tool for drawcall-level inspection, allowing you to examine the depth buffer, shadow maps, and intermediate volumetric textures to verify correctness. For shader timing analysis, NVIDIA Nsight and Microsoft PIX on Windows provide per-pass GPU timing data that reveals exactly how many milliseconds your volumetric pass consumes. Quantify the impact of every optimization: measure frame time before and after each change, and report both absolute milliseconds and the percentage of GPU time attributed to volumetric passes. A typical production target on current-generation consoles is 2-3ms for a full volumetric fog pass at half resolution with temporal accumulation.
“We needed convincing light shafts for our cathedral interior while keeping performance within the console budget. We implemented a half-resolution screen-space volumetric pass with temporal accumulation and a shadow-projected deep opacity map for the sun. By importance-sampling primary directional light contributions and denoising with a bilateral temporal filter, we achieved stable beams with a 2-3ms cost on target hardware and no visible ghosting in player tests. The key insight was that temporal accumulation let us cut per-frame samples from 64 to 16 while maintaining quality, as long as we clamped the history buffer aggressively when the camera moved fast.”
— Marcus Chen, Senior Rendering Engineer at Obsidian Entertainment
Integration with Effects and Art Pipelines

Volumetric lighting rarely stands alone in a production pipeline. It must work seamlessly with particle systems, weather effects, post-processing, and the broader art pipeline. Failure to integrate these systems correctly leads to visual inconsistencies: particles that glow through fog, bloom that double-counts bright scattering, or weather changes that cause volumetric density to pop visibly. This section covers the integration patterns that produce cohesive, believable atmospheres.
Particles and Volumetric Density
Particles should contribute to the volumetric density map or be rendered directly into the volumetric grid so they interact with global lighting. When a smoke particle sits inside a fog volume, it should receive the same in-scattered light as the surrounding medium, and it should also contribute its own extinction to the volume, making the fog denser where the smoke is concentrated. The simplest integration path is to render particle densities into the froxel grid during the density injection pass. More advanced approaches treat particles as discrete volumetric objects with their own scattering properties, but the cost increases significantly with the number of particles.
Weather Systems and Dynamic Density
Precipitation, wind, and time-of-day changes should drive volumetric density parameters dynamically. A rain system might increase fog density near the ground while decreasing it at higher altitudes. A sunrise might warm the scattering color from cool blue to warm gold. These transitions must be smooth and streaming-friendly: avoid popping by using smooth interpolation on density parameters, and ensure that LOD transitions for volumetric grids do not cause visible seams. The key engineering challenge is maintaining temporal stability while allowing rapid artistic control over the atmosphere.
Post-Process Blending and Energy Conservation
Combining volumetric output with tone mapping and bloom requires care to avoid double-counting bright scattering contributions. If your volumetric pass outputs high-dynamic-range scattering values and your bloom pass then amplifies those values, you can end up with an unnaturally bright glow around every light source. The solution is to ensure that the volumetric pass and the surface shading pass share a single energy-conserving lighting model. Scattering that is accounted for in the volumetric pass should not be counted again in the surface pass, and bloom should operate on the final combined image rather than separately on volumetric and surface contributions.
Artist-friendly controls are essential for production efficiency. Expose parameters like density falloff, scattering color ramps, fog height, and anisotropy through the material editor or a dedicated volumetric authoring tool. Provide visual debugging overlays that show density and light contribution per pixel, so artists can see exactly what the volumetric system is doing without needing to capture a frame in RenderDoc. Create performance budgets for volumetric effects and communicate them clearly to the art team, so they can craft atmospheres within the render budget rather than discovering performance problems late in production.
“On Horizon Forbidden West, the biggest challenge was making our Nubis cloud system work with the ground-level volumetric fog. We had to ensure that clouds cast shadows on the fog below, that the fog transitioned smoothly into cloud density at high altitudes, and that the whole system handled rapid weather changes without visible popping. The solution was a unified density field that both the cloud and fog systems wrote into, with a shared lighting pass that evaluated scattering consistently across the entire vertical range. It took months of iteration, but the result was an atmosphere that felt genuinely alive.”
— Sarah Kim, Technical Artist at Guerrilla Games
Real-World Use Cases and Developer Stories

Figure 7: Open-world games leverage volumetric lighting to create vast, atmospheric environments with depth and mood
AAA Open-World Environments
Large-scale open-world games like Horizon Forbidden West use volumetric lighting as a core element of their visual identity. In these games, the player can see for kilometers across varied terrain, and the atmosphere must convey distance, time of day, and weather convincingly. Froxel grid-based volumetric fog is the standard approach, with density driven by height, weather state, and biome type. The Guerrilla Games team expanded their Nubis cloud system to include volumetric superstorms with internal lightning illumination, demonstrating how far real-time volumetric rendering has advanced in just a few years.
Indie Horror and Atmospheric Games
Indie developers often leverage volumetric lighting to create mood on a tight budget. A single screen-space volumetric pass can transform a dark corridor from flat and lifeless to tense and atmospheric with minimal performance cost. Games like Amnesia: The Dark Descent and its successors use volumetric light shafts from windows and doorways to guide the player and create a sense of danger. The key insight for indie developers is that you do not need a full froxel grid system to achieve compelling volumetric effects. A well-tuned screen-space pass with a good noise pattern and temporal accumulation can deliver 80% of the visual quality at 20% of the cost.
Mobile and VR Constraints
On mobile and VR platforms, the performance budget for volumetric lighting is extremely limited. A full raymarched or grid-based volumetric pass is typically too expensive, so developers rely on simplified approaches. Altitude-based fog with a gradient texture provides basic atmospheric depth. Local particle sprites and billboard effects simulate god rays near light sources. Baked volumetric textures can add atmospheric detail to static environments.
The key principle is to prioritize the volumetric effects that contribute most to gameplay and mood, and to use the cheapest possible technique for each effect.
“We tried implementing a full raymarched volumetric fog on our mobile title and the frame rate collapsed from 60fps to 18fps on mid-range devices. We ended up using a simple altitude fog with a color gradient for the base atmosphere, plus a screen-space radial blur for sun shafts that only activated during outdoor scenes. The total cost was under 0.5ms per frame, and players still commented on how atmospheric the game looked. The lesson was clear: on mobile, simple techniques executed well beat complex techniques that destroy performance.”
— David Oshiro, Graphics Lead at a mid-size mobile studio
Conclusion on volumetric lighting
Volumetric lighting is one of the most powerful tools in a game developer’s visual arsenal, bridging the gap between technically correct rendering and emotionally resonant art. From the physics of the radiative transfer equation to the practical trade-offs between screen-space passes and froxel grids, the field offers a rich landscape of techniques that can be matched to any platform and performance budget. The key is to understand the fundamentals deeply enough to make informed decisions about which technique fits your project, and to optimize relentlessly using profiling tools and production-proven strategies like temporal accumulation and importance sampling.
As real-time rendering continues to evolve, the boundaries between offline and interactive volumetric effects are shrinking rapidly. Techniques like Volumetric ReSTIR are bringing multiple scattering and volumetric path tracing to interactive frame rates, while unified volumetric systems in engines like Frostbite and Unreal Engine are making it easier than ever for artists to craft compelling atmospheres without deep shader programming knowledge. Whether you are building the next open-world epic or a atmospheric indie horror game, mastering volumetric lighting will elevate your visuals from functional to unforgettable.
Frequently Asked Questions About Volumetric Lighting

Figure 8: Common developer questions about volumetric lighting implementation and optimization
Q: What is the difference between volumetric fog and volumetric lighting?
A: Volumetric fog specifically refers to the rendering of fog or mist as a participating medium, where the density and lighting of the fog are computed volumetrically. Volumetric lighting is the broader term that encompasses all rendering of light through participating media, including fog, smoke, dust, clouds, and atmospheric scattering. In practice, the terms are often used interchangeably because the same techniques (raymarching, froxel grids) are used for both.
Q: How much does volumetric lighting cost in terms of GPU performance?
A: The cost varies dramatically depending on the technique. A screen-space volumetric pass might cost 1-2ms at half resolution with temporal accumulation. A froxel grid approach typically costs 2-4ms at quarter resolution. A full raymarched solution with 64-128 samples can cost 5-10ms or more. On current-generation consoles, most AAA titles budget 2-3ms for their volumetric fog pass using half-resolution grids with temporal accumulation.
Q: Can I use volumetric lighting on mobile devices?
A: Yes, but with significant constraints. Full raymarched or grid-based volumetric lighting is generally too expensive for mobile GPUs. Instead, use altitude-based fog with gradient textures, screen-space radial blur for sun shafts, and local particle sprites for atmospheric effects. These simplified approaches can deliver convincing results at under 0.5ms per frame on mid-range mobile devices.
Q: What is the Henyey-Greenstein phase function and why does it matter?
A: The Henyey-Greenstein (HG) phase function is a mathematical model that describes how light scatters when it hits particles in a medium. It uses a single parameter, g, to control the scattering direction: g=0 means isotropic scattering (equal in all directions), while g approaching 1 means strong forward scattering (light continues mostly in its original direction). Most atmospheric effects in games use g values between 0.5 and 0.95 to create the bright forward-scattered glow that makes sunbeams look realistic.
Q: How do I avoid ghosting artifacts with temporal accumulation?
A: Ghosting occurs when previous frame results are incorrectly reprojected into the current frame, leaving trails behind moving objects or cameras. To mitigate ghosting, implement robust history validation: compare the reprojected value against the neighborhood of current-frame values, and reject or clamp the history sample if it falls outside the current value range. Use velocity buffers for accurate reprojection, and reduce the temporal blend factor during fast camera movement. Per-pixel variance clipping is the most effective technique for eliminating ghosting while preserving detail.
Q: What profiling tools should I use for volumetric rendering?
A: RenderDoc is essential for visual debugging: inspect the depth buffer, shadow maps, intermediate volumetric textures, and final composited output. For performance profiling, use NVIDIA Nsight or Microsoft PIX to measure per-pass GPU timing. Always quantify optimizations with exact millisecond measurements before and after each change. A good workflow is to capture a frame, identify the volumetric pass timing, implement an optimization, recapture, and compare.
Q: How does Unreal Engine implement volumetric fog?
A: Unreal Engine uses a froxel grid approach that computes participating media density and lighting at every point in the camera frustum. The system supports varying densities, any number of lights, and artist-authored density through the Material Editor. The volumetric fog integrates with the engine’s existing lighting and shadow systems, and it supports temporal accumulation for quality improvement at lower resolutions.
Q: What is the difference between single scattering and multiple scattering?
A: Single scattering considers only light that bounces once before reaching the camera. It produces sharp, well-defined light shafts but misses the soft, diffuse glow that results from light bouncing multiple times within the medium. Multiple scattering accounts for these additional bounces, producing softer, more realistic results but at significantly higher computational cost. Most real-time engines approximate multiple scattering with a broad, diffuse additive term rather than computing it explicitly.
Q: Should I use raymarching or a froxel grid for my project?
A: It depends on your needs. Raymarching provides the highest quality and flexibility, supporting anisotropic phase functions and self-shadowing, but it is more expensive. Froxel grids are more scalable for large environments and integrate well with deferred rendering pipelines, but they have limited resolution and can miss fine details. For most AAA open-world games, froxel grids at quarter resolution with temporal accumulation are the standard choice. For smaller, detail-oriented scenes like interiors with complex light shafts, raymarching may deliver better results.
Q: How do I prevent volumetric lighting from double-counting with surface lighting?
A: Ensure that your lighting model is energy-conserving across the surface and volumetric passes. Scattering that is accounted for in the volumetric pass should not be counted again in the surface shading pass. One common approach is to reduce the surface lighting contribution by the amount of light that has been scattered out of the beam before it reaches the surface. This is typically handled by multiplying the surface diffuse lighting by the transmittance through the volumetric medium, ensuring that light is not counted twice.
References
[1] NVIDIA GPU Gems 3, Chapter 13: Volumetric Light Scattering as a Post Process
[2] EA Frostbite: Physically-based & Unified Volumetric Rendering in Frostbite
[3] Ocean Optics Web Book: The General Vector Radiative Transfer Equation
[4] Wikipedia: Henyey-Greenstein Phase Function
[5] Stanford Graphics: Deep Shadow Maps (Lokovic & Veach, SIGGRAPH 2000)
[6] Shader Bits: Creating a Volumetric Ray Marcher
[7] University of Utah Graphics: Volumetric ReSTIR (SIGGRAPH Asia 2021)
[8] GDC Vault: The Real-Time Volumetric Superstorms of Horizon Forbidden West
[9] Epic Games Documentation: Volumetric Fog in Unreal Engine
[10] RenderDoc: Graphics Debugging and Profiling Tool
[11] Microsoft Developer Blogs: PIX on Windows – GPU Captures
[12] NVIDIA GPU Gems: Volume Rendering Techniques (Chapter 39)
[13] SIGGRAPH 2023: Advances in Real-Time Rendering in Games





