# Bachelor Thesis
During Q1-Q2 2026, I developed my Bachelor's Thesis: a real-time rendering engine for Signed Distance Fields (SDFs) with a physics engine built entirely around implicit geometry.
Traditional SDF rendering relies on sphere tracing, requiring many expensive distance evaluations per pixel. My work focused on making this approach practical for real-time applications through two main optimizations:
- A sparse volumetric LOD cache allowing distance queries to be answered through interpolation instead of evaluating the scene function.
- Hardware-accelerated ray tracing to analytically compute the first surface intersection near implicit geometry, significantly reducing sphere tracing iterations
On top of the renderer, I implemented an XPBD-based physics engine that directly uses SDFs for collision detection and constraint solving, avoiding the need for traditional mesh-based collision structures.
The project also includes a deferred PBR renderer, ray-marched and ray-traced shadows, SDF ambient occlusion, denoising, hot shader reloading, and a complete editor with debugging and profiling tools.
The final implementation achieved up to a 36x speedup over the baseline renderer while maintaining high visual quality and accurate physics simulation, using approximately 1 GB of GPU memory.
Code can be found in my repo.
Slides (in english) can be found here. 62 slides.
Written report (in spanish) can be found here. 91 pages.
## Features
- Sparse Brick Set representation with an LOD cache for distance values
- XPBD physics engine using SDF-based constraints
- Hardware ray tracing of implicit surfaces
- Deferred renderer with:
- Physically Based Rendering (PBR)
- Directional lighting
- Exponential fog
- Ray-marched / ray-traced shadows
- Ambient Occlusion computed from SDF values
- Shadow and AO denoising using downsampling + bilateral blur
- Hot shader reloading
- Full editor with:
- Gizmos
- Scene loading/saving
- Drag-and-drop editing
- Profiler
- Logger
- Tonemapping
- Debug visualization and interactive tools
## Demos
I loved making this project, SDFs are so cool!