Black Hole Renderer

This C++ project is more of a port of a scratch project called "gravity raycaster". I liked it so much that I wanted to add my own little things to it, and improve the performance further. Because C++ is a performant language I converted it to C++ and removed the coloring because HSV sucks, and re-did it in mostly the same way.

Controls

(the controls are messy and i randomly selected the keys, if you're gonna do the same i recommend thinking more than a picosecond about mapping of the keys)


WASDQE to move

Arrow keys to rotate camera

G to toggle light bending

H to toggle acreation disk

I/O to in/decrease samples

F1/F2 to de/increase ray step size

F3/F4 to de/increase the acreation disk's size

F5/F6 to de/increase downscaling

F7/F8 to de/increase render distance

F9/F10 to de/increase gravity's strength

F11 to toggle fullscreen

Compile with: g++ blackhole.cpp -o blackhole -lGL -lGLU -lglut -Ofast


Now this project executes only on the CPU, so it's very, very, very inefficient. I might go back and use a fragment shader to trace the ray, but then again I am too lazy for any of that shit. If you want to waste your time, do it and let me know or something :)

Some images

Downscale on 12, and background disabled Supersampling on 16, and MSAA enabled nograv nolines



copyleft go steal it or something