Overview

HTrace WSGI is a fully dynamic software ray-tracing system for rendering diffuse indirect lighting with infinite light bounces. It doesn’t require any kind of baking or asset pre-processing and is designed to work out of the box with little to no tweaking.


MAIN FEATURES

  • Full Integration into the Rendering Pipeline: automatic resource injection that doesn’t require manual setup or package customization. HTrace WSGI overrides native indirect lighting resources, ensuring compatibility with other rendering effects.

  • Dynamic Lighting and Objects: HTrace WSGI supports fully dynamic environments where objects, materials, and lighting can be changed in real time. All moving objects, including skinned meshes, participate fully in global illumination, casting and receiving indirect lighting and shadows.

  • Hybrid Software Ray Tracing: a two-stage tracing algorithm that leverages both screen-space and world-space data to deliver per-pixel lighting response and accurate indirect shadows. No special hardware is required.

  • Advanced Denoising: HTrace WSGI uses cutting-edge denoising and sampling techniques, like ReSTIR GI, with temporal and spatial passes to reduce noise even in complex lighting scenarios. Special care is taken to preserve high-frequency details such as contact shadows and normals.

  • Real-Time Scene Voxelization: a flexible, GPU-driven voxelization system for building a world-space tracing acceleration structure on the fly. Comes with an advanced time-sliced voxelization, adaptive culling & mesh LOD control.

  • Irradiance Cache: provides infinite light bounces in world-space by automatically caching lighting data in a spatial hash structure.

  • Emissive Lights: all emissive surfaces can act as real light sources, casting indirect shadows and contributing fully to global illumination. There’s no upper limit on the number of emissive lights.

  • Punctual Lights: HTrace WSGI supports Point and Spot light sources, fully accounting for their emission and shadows.

  • Sky Lighting & Occlusion: the sky itself functions as a dynamic light source, producing realistic lighting and physically accurate occlusion.

  • APV Support: Unity's Adaptive Probe Volumes are automatically utilized as a ray-miss fallback, ensuring a smooth transition between HTrace WSGI lighting and APV data. Additionally, APV can be used to accelerate multi-bounce light calculations.

  • GPU Instancing: HTrace WSGI supports instancing through RenderX functions as well as native instancing for Terrain Trees, and Terrain Details, enabling fast voxelization of dense environments and rich vegetation. Examples and documentation for custom instancing shaders are provided.

  • Open Code: the code is open for modification. If you have questions about how it works, feel free to reach out to us on Discord.

TECHNICAL DETAILS

Supported Light Types: world-space tracing currently supports the following light sources: Sky, Directional Light, Spot Light, Point Light and Emissive materials.

Supported Shaders: voxelization supports these shaders out of the box: Lit, LayeredLit (first 2 layers), TerrainLit (first 4 layers), Unlit and SpeedTree.

ShaderGraph and custom shaders are supported as long as they follow Unity’s naming conventions (e.g. _BaseColor). The material evaluation code is open for easy modification and extension.

Voxelization: scene voxelization has spatial limitations. There’s a tradeoff between voxel coverage and accuracy, but we provide different instruments for finding the right balance.

VR: Single Pass is supported as an experimental feature.

Compatibility

  • Currently tested APIs are: DX11 and DX12.

  • Currently supported HDRP versions are: 14 and above.

  • Currently supported Unity versions are: 2022.2.3 and above.

Feel free to use the Unity forum thread and Discord for direct communication and bug reports.

Last updated