Real-time Path-tracer in Unity
About
This is a toy real-time path-tracer developed in Unity. A number of C# scripts control the main application, whilst a compute shader written in HLSL renders frames. This was originally created for the Advanced Games Engineering module I did at university, but has been adapted for public release.
The application currently contains four scenes which can be explored and rendered in real-time. As the camera moves, noise appears on the screen. By keeping the camera stationary, the frames converge to give a better image. The application is capable of rendering four different materials - Lambertian, metallic, dielectric, and emissive - which alter how rays are reflected and refracted.
This toy application does not require DX12 RTX enabled GPUs and should work with DX11 GPUs. However, performance will vary for different GPUs. If performance is an issue, try reducing the resolution from the main menu.
The application is contained in a zip file, which can be downloaded below. Feel free to leave a message or issue in the comments below.
CONTROLSThe controls for the application are detailed as follows:
MOVEMENT AND CAMERA InputActionWMoves in the direction that the camera is facingSMoves away from the direction the camera is facingAStrafe leftDStrafe rightMouseChange where the camera is looking SKY COLOUR InputActionF1Enable a blue skyF2Enable a night skyF3Enable a vaporwave skyF4Enable a textured sky OTHER CONTROLS InputActionKReduce the ray bounce limit by 1LIncrease the ray bounce limit by 1NEnable denoising (enabled by default)MDisable denoisingEscapeReturn to the main menu FUTURE WORKAlthough this is a toy application, there is still further work to carry out. These include:
- Improvements to performance
- Adding volumetric fog effects
- Adding textures
- Adding more materials
- Adding physically-based rendering techniques