March 17, 2014

Fun with Shaders

Discovered this really cool website where you can play around with OpenGL shaders.

Here's my first shader effect!  Really quite boring compared to some of the examples on there but I like it.

It just fades in and out of colors.  When it comes to graphics it's actually really useful knowing a bit of trig.. I never really saw the use before, but I've used sin and cos to achieve a parabolic effect when simulating a gentle up and down motion, and I've also used them to keep values within the range of 0 and 1.  This sounds really basic to someone experienced with trig/graphics but to someone who never really appreciated its use before, it's really handy to know when coding up simple graphics algorithms.

//Edit
Whoa dang look at this one!  I feel like I'm traveling through someone's arteries.  I can't believe they made that starting with the same base I did.

Or this one.  Feel like I'm traveling through space at light speed.

Or this one - it's like I'm cruising through a velvet desert on the sun on a hovercraft.

Oh goodness I love this one too.  It's like an invisible volcano is shooting up fairy dust.  How did they get the stars to appear?

// Edit March/18/2014
I liked the last one so much I made my own version.  All I did was change the parameters a bit and made the specks a bit fuzzier.  If I randomized them so most of them were blurry but some of them were sharpened, it'd look pretty cool.  Or have different shapes generated.