ABSTRACT

This chapter presents an extension of well-known ray-marching techniques for volume rendering fit for modern graphics processor units (GPUs), in an attempt to modernize the emulation of explosions in games. By switching to a volumetric system, explosions look good from all view angles as they no longer depend on camera-facing billboards. Furthermore, a single volumetric explosion can have the same visual quality as thousands of individual particles, thus, removing the strain of updating, sorting, and rendering them all—as is the case with particle systems. The explosion is rendered by first generating a hemisphere mesh of a radius equal to the maximum radius of the explosion. Then, shrink the hemisphere around the explosion to form a tight-fitting semi-hull. This is done to decrease the amount of degenerate fragments when later performing ray marching in the pixel shader. Rendering an explosion with one of the customized primitives above can be useful in situations where explosions are formed from explosive containers.