Overview
Last updated
Last updated
HTrace 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.
Full Integration into the Rendering Pipeline: automatic resource injection that doesn’t require manual setup or package customization. HTrace overrides native indirect lighting resources, ensuring compatibility with other rendering effects.
Dynamic Lighting and Objects: HTrace 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 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.
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 lighting and APV data. Additionally, APV can be used to accelerate multi-bounce light calculations.
GPU Instancing: HTrace supports instancing through RenderX functions as well as native instancing for Terrain, Trees, and Details, enabling fast voxelization of dense environments and rich vegetation. Examples and documentation for custom instancing shaders are provided.
Open Code: feel free to modify it. If you have any questions on how any part of it works you can always reach out to us on Discord.
Supported Light Types: world-space tracing currently supports the following light sources: Sky
, Directional Light
and Emissive materials
. Support for punctual light sources (point, spot, etc.) is planned.
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.
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.
Our goal is to improve the asset through rapid and iterative updates, so if you found a bug or something isn’t working as you expected - please, contact us on Discord. We will do our best to resolve the issue.
Feel free to use the Unity forum thread and Discord for direct communication and bug reports.