Skip to content

Star-Street/raymarching

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Black Hole Rendering in Unity

This project is a Unity Engine project focused on rendering realistic black holes using raymarching and volumetric techniques.

I made a full YouTube video where I explain in detail how everything works:
📺 Watch here: https://youtu.be/dMohMW29gSM

image

Scenes Included

The project contains 4 different scenes:

  1. Simple Raymarching Demo – A minimal example to demonstrate the raymarching technique.
  2. Volumetric Cloud Demo – Shows how volumetric rendering can be used for cloud-like effects.
  3. Black Hole (No Accretion Disk) – A pure gravitational lensing example without any surrounding matter.
  4. Black Hole with Volumetric Accretion Disk – A complex black hole surrounded by a volumetric, cloud-like accretion disk.

Note: In the last scene, rendering quality is intentionally reduced to improve performance.
To increase quality:

  • Reduce the step size
  • Increase the maximum step count

Requirements

  • Unity (2021.3 LTS or newer recommended)
  • A GPU capable of handling raymarching and volumetric rendering

License

Feel free to explore, modify, and learn from the project. Please credit the original repository or video if you use it in your own work.


Author: TheCodeStories
📺 YouTube: https://www.youtube.com/@The_Code_Stories

About

Fooling around with raymarching.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ShaderLab 62.0%
  • C# 24.5%
  • HLSL 13.5%