Just for fun

While I was preparing for that class where I created the orange, I spent a little time just noodling around with shader code. I didn’t have any particular goal in mind other than to have fun and see what would come out.

What came out is something that looks like this, except animated (it’s a lot cooler when you see it animated):


The code that creates this fits in just a page of text. You can see both the code and the animation it creates if you click HERE.

If you’re looking at the shader code, the most interesting section is that four line stretch surrounded by blank lines. That’s where all of the swirling cloud texture is created.

If you like programming, feel free to try editing the code and see what happens. If your changes make the whole thing stop running, you can always just refresh the page and try again.

Leave a Reply

Your email address will not be published. Required fields are marked *