noneuclideandreamer, German
@noneuclideandreamer@mathstodon.xyz avatar

Genuary Prompt 30: Shaders

I haven't managed to get my head space into GPU. So here's some shading with CPU...

The object (here a sphere) is specified by an array of Locations and normal vectors. The angle between light direction and normal vector tells how bright a point is. Then it gets drawn.

Looking at a half illuminated sphere from all sides. Looks like the moon going through its phases.

eljojo,
@eljojo@ruby.social avatar

@noneuclideandreamer this really blew my mind. i don't even understand the entirety of the description, but it looks amazing.

noneuclideandreamer,
@noneuclideandreamer@mathstodon.xyz avatar

@eljojo Thanks!
The key is to factor in the angle at which the light hits the surface since the rays per area ratio is higher if the light comes from the zenit.

travisfw,
@travisfw@mastodon.gamedev.place avatar

@noneuclideandreamer that's no moon…

noneuclideandreamer,
@noneuclideandreamer@mathstodon.xyz avatar

@travisfw 💥🌑

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • tacticalgear
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • khanakhh
  • Youngstown
  • ngwrru68w68
  • slotface
  • everett
  • rosin
  • thenastyranch
  • kavyap
  • GTA5RPClips
  • cisconetworking
  • JUstTest
  • normalnudes
  • osvaldo12
  • ethstaker
  • mdbf
  • modclub
  • Durango
  • tester
  • provamag3
  • cubers
  • Leos
  • anitta
  • megavids
  • lostlight
  • All magazines