Skip to content

FidelityFX Brixelizer GI

This sample demonstrates the use of the FidelityFX Brixelizer GI effect.

For details on the techniques that underpin the Brixelizer GI effect you can refer to the respective technique documentation. The implementation of the Brixelizer GI sample can be found in the samples/brixelizergi directory.

FidelityFX Brixelizer GI

Requirements

Windows DirectX(R)12 Vulkan(R)

UI elements

Settings in Brixelizer GI are split into the two categories static and dynamic. Static settings refer to settings which must be specified at context creation time, and thus require destroying and re-creating the Brixelizer context. Dynamic settings refer to settings which may be varied per frame. The table below summarises the static settings and what they control within the sample.

Element nameValueDescription
Mesh Unit Size0...1The size in world space units of a Brixelizer brick in the most detailed cascade. To see the effect of this setting clearly, the output type BRICK_ID may be selected so that individual bricks are clearly visible as the setting is varied.
Cascade Ratio Size1.1...3The ratio of brick sizes between each cascade level.

The table below summarises the dynamic settings and what they control within the sample.

Element nameValueDescription
Output ModeNone / Example Shader / Debug Visualization / Diffuse GI / Specular GI / Radiance Cache / Irradiance CacheSelect the output mode of the sample. Values explained below.
Output TypeDISTANCE / UVW / ITERATIONS / GRADIENT / BRICK_ID / CASCADE_IDOnly available with the example shader. Values explained below.
Start Cascade0...7The index of the first cascade to use for ray marching.
End Cascade0...7The index of the last cascade to use for ray marching.
SDF Solve Epsilon0...1The value used to determine when a hit has been encountered in ray marching.
SDF Center Follow Cameratrue / falseToggle whether or not to update the center of the SDF as the camera is moved.
TMin0...10The minimum distance to be used in calculating hits.
TMax0...10000The maximum distance to be used in calculating hits.
Ray Pushoff0...10The distance from a surface along the normal vector to offset the diffuse ray.
Diffuse GI Factor0...10The factor used for blending diffuse GI in the final output.
Specular GI Factor0...10The factor used for blending specular GI in the final output.
Enable GItrue / falseToggle whether or not to use Brixelizer GI. If not used, the scene is shown with direct lighting only.
Multi-Bouncetrue / falseToggle whether or not to simulate multi-bounce GI with Brixelizer GI or only do single bounce GI.
Reset StatsClickReset the statistics collected on Brixelizer. Statistics explained below.

The following table summaries the different output modes available for the sample.

ValueDescription
NoneDraw the scene normally. Whether or not Brixelizer GI is used is toggled with the Enable GI control.
Example ShaderShow the output of the example shader from the sample demonstrating the underlying Brixelizer SDF.
Debug VisualizationShow the debug visualization from the Brixelizer GI API.
Diffuse GIShow the diffuse GI calculated by Brixelizer GI.
Specular GIShow the specular GI calculated by Brixelizer GI.
Radiance CacheShow a visualization of the radiance cache calculated by Brixelizer GI.
Irradiance CacheShow a visualization of the irradiance cache calculated by Brixelizer GI.

The following table summarises the output options available for the example shader. This shader demonstrates the underlying Brixelizer technique and its SDF representation of the scene.

ValueDescription
DISTANCEDisplay a colour gradient showing the distance to hit.
UVWDisplay the UVW coordinate of each hit. The UVW coordinates of hits are XYZ positions of a hit relative to the brick origin.
ITERATIONSDisplay a heatmap gradient showing number of iterations before convergence.
GRADIENTDisplay the normal at each hit.
BRICK_IDDisplay each brick in a random colour.
CASCADE_IDDisplay the cascade of each hit in a different colour.

The following table details the statistics collected for Brixelizer. Each statistic has a static and dynamic version corresponding to static and dynamic geometry, which are handled separately by Brixelizer.

ValueDescription
Free BricksThe current number of free bricks available with Brixelizer.
Max BricksThe highest number of brick allocations attempted in a single frame.
Max TrianglesThe highest number of triangles allocations attempted in a single frame.
Max ReferencesThe highest number of reference allocations attempted in a single frame.

Setting up FidelityFX Brixelizer GI

The sample contains a render module for Brixelizer GI which manages context lifecycle and dispatch.

Sample Controls and Configurations

For sample controls, configuration and FidelityFX Cauldron Framework UI element details, please see Running the samples

See also