Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am realdarklord on github.
  • I am realdarklord (https://keybase.io/realdarklord) on keybase.
  • I have a public key ASC8TZC5KFCOfngEOOfXVNeAOuvN5muzckzotVsMRWm5SAo

To claim this, I am signing this object:

Black Hole (WebGL Shader)

Really glad to finally have this working as I'd like. This is a remake of one of my previous pens: https://codepen.io/darrylhuffman/pen/EWOJMW but this one is far more interactive. I hope you all enjoy!

It's kind of hard to make this accurate since I don't really know how a black hole actually looks... There are many different interpretations, some where it gets super bright around the black hole & then black in the middle, but those look dull. I'm taking more of the gravitational lensing approach here now.

I also find it odd that unintentionally, if you hold down click it will "take you into the black hole" and suddenly see the black hole on another part of the image it's not supposed to be on (and not usually visibl ). You'd imagine the black hole would stay in the same place on "the other side" but it's almost like it leads to another place.

A Pen by Darryl Huffman on