Geometry Passes

2 minute read

← Back to all passes

PrePass

Responsible for:

  • Early rendering of depth (Z) from non-translucent meshes

Cost affected by:

  • Triangle count of meshes with Opaque materials
  • Depending on Early Z setting: Triangle count and complexity of Masked materials
Figure: Depth buffer (aka z-buffer) - the result of pre-pass

Description TODO. Its results are required by DBuffer decals. The pre-pass may also be used by occlusion culling.

Optimization: Engine → Rendering → Optimizations → Early Z-pass

HZB (Setup Mips)

Responsible for:

  • Generating the Hierarchical Z-Buffer

Cost affected by:

  • Rendering resolution

The HZB is used by an occlusion culling method1 and by screen-space techniques for ambient occlusion and reflections2.

Warning: Time may be extreme in editor, but don’t worry. It’s usually a false alarm, due to an bug in Unreal. Just check the value in an actual build. The bug is hopefully fixed since UE 4.183.

ParticleSimulation, ParticleInjection

Responsible for:

  • Particle simulation on the GPU (only of GPU Sprites particle type)

Cost affected by:

  • Number of particles spawned by GPU Sprites emitters
  • Collision (Scene Depth) module
Figure: GPU-simulated particles with screen-space collision enabled

If you enabled GPU Sprites in a particle emitter, then their physics simulation is done here. The cost depends on the number of particles spawned by such emitters. Enabling the Collision module increases the complexity of the simulation. The collision of GPU sprites with the rest of the scene is tested against screen-space data (for example the Z-depth). This makes it faster than the traditional, CPU-based collision of particles against actual 3D meshes. Still, it’s not entirely free – and the cost is moved to the GPU.

Optimization

The bigger the number of particles that have to be simulated (especially collide), the bigger the cost. Remember that you can use particle level of detail (LOD) to limit the number of particles being spawned. You may get away with much smaller numbers if the emitter is viewed from far distance.

RenderVelocities

Responsible for:

  • Saving velocity of each vertex (used later by motion blur and temporal anti-aliasing)

Cost affected by:

  • Number of moving objects
  • Triangle count of moving objects

Takes the velocity of every moving vertex and saves it into the motion blur velocity buffer.

Footnotes