Skip to content

Small Project for some fun Ray/Path tracing experiments with compute shaders in Unity

Notifications You must be signed in to change notification settings

FlorisDeVries/TracersComputeShaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compute Shaders - Ray and Path Tracer in Unity

Nice Render

The Compute Shaders project was a personal exploration into optimizing rendering techniques, specifically ray and path tracing, using Unity. Building on my knowledge from the Advanced Graphics course, this project allowed me to dive deeper into compute shaders and their potential for GPU acceleration.

Project Overview

To get started, I followed this comprehensive tutorial on implementing ray and path tracing in Unity. After completing the tutorial, I expanded upon the initial framework to include additional techniques and features:

  • Beer's Law: Simulated light absorption for realistic rendering of transparent objects.
  • Reflections and Refractions: Enhanced light behavior at material boundaries.
  • Skybox Integration: Added a skybox for realistic environmental lighting.
  • Improved Scene Structure: Organized the Unity project with scriptable objects to allow easy swapping of scenes and rendering techniques.

Key Learnings

This project taught me valuable lessons in Unity and rendering techniques, including:

  • Compute Shaders: Leveraged the GPU for parallelized ray and path tracing, achieving significant performance improvements compared to CPU-based methods.
  • Scriptable Objects: Simplified data management in Unity, making the project more modular and scalable.
  • Rendering Optimization: Applied concepts from my Advanced Graphics course to create a more efficient and visually stunning implementation.

Screenshots and Renders

Below are some renders showcasing the capabilities of the ray and path tracers:

Path Tracer (Scene 1)

Path Tracer - Scene 1

Demonstrates realistic lighting, reflections, and refraction.

Ray Tracer (Scene 1)

Ray Tracer - Scene 1

Highlights the difference in rendering techniques for the same scene.

Path Tracer (Scene 2)

Path Tracer - Scene 2

A different perspective showing complex material interactions.

Future Plans

While this project is complete for now, it serves as a solid foundation for further experimentation. I may revisit it in the future to explore additional features, optimizations, and rendering techniques.

Additional Resources

If you're interested in learning more about Unity and compute shaders, I recommend:

License

This project is available for educational purposes.

About

Small Project for some fun Ray/Path tracing experiments with compute shaders in Unity

Resources

Stars

Watchers

Forks