[Media] My blackhole shader (built on Cuneus (an engine for compute shaders) to demonstrate how a complex shader can be created with minimal, wgpu boilerplate free rust code)

99 points rumil23 7 comments
[Media] My blackhole shader (built on Cuneus (an engine for compute shaders) to demonstrate how a complex shader can be created with minimal, wgpu boilerplate free rust code)

yeah we all know the internet has plenty of black holes already. but I couldn't resist making one of my "own" anyway at least by using some "non-usual" ways...
geodesics, disk coloured with spectral rendering etc etc .
But my actual goal was to show you how a complex shader can be created in the Rust backend with minimal boilerplate code. see yourself:

rust:
https://github.com/altunenes/cuneus/blob/main/examples/blackhole.rs
shader:
https://github.com/altunenes/cuneus/blob/main/examples/shaders/blackhole.wgsl

btw if you like my "art", you can directly download "exe" (:-p) and see how it looks (with real time egui params): windows, linux and macs
https://github.com/altunenes/cuneus/releases/tag/v0.6.2
search as "blackhole".
Note, I code this with my macos m3 air 16gb. And I cant dare to look this at full resolution. so be aware of that. dont run it if you don't trust your gpu...