Tuesday May 16th

5/16/17 - Shaders are Cool!

Holy crap, Shaders are cool!!

Yes, I really did say that twice twice.

I had a lot of fun today on this stuff. I want to continue, and hopefully build a few games over the course of the rest of the year. Specifically, in C++.

Schedule

  • I have class tonight (7 to 10pm).

  • I get home around minutes to midnight. Then, I do laundry and pack.

  • A shuttle picks me up at 3:45am or something, takes me to the airport, and my flight is at 7.

  • Then I find the shuttle one stop away to take me to IO. Somewhere right after the Keynote, I’m supposed to make my way to the CHM (Computer History Museum) to go see two friends.

  • Then I come back to IO, and then (possibly) head back again to CHM for a photo and hang-out with the ABI (Anita Borg Institute).

  • Then I head back to IO for their Comedy show, “Speechless” (around 6pm?). Speechless is an improv session, which is pretty much hilarious. It includes a random wheel in which contestants spin and therefore are given topics, and a random set of presentation slides (which have nothing to do with each other). They must then give a presentation that is on-topic from the topic they received by spinning the wheel, while keeping a straight face and working with their (hilarious) slides given. It’s a lot of fun!

  • Then, I take a shuttle back to SF and check-in.

Yep, it’s a lot.

Feel free to look at some pretty renderings, though :)

Changing the colour (inverting background and projected rectangle)

sh_015

sh_017

Checking rotation

sh_016a

We rotated 45 degrees

sh_016

Implementing a light

sh_020

This sort of blew my mind when it first compiled and ran

sh_021

Some more

sh_022

sh_023

So these vertices are basically your “window” projection

sh_024a

Only rendered a rht (right angled-triangle)

  • You’re rendering vertex to vertex (see this post)

sh_024a

sh_024

Then we added a Mouse Pointer

  • So it followed the Mouse around (it being the light position)

sh_025

Duplicating renderings/ windows

Code

sh_027

sh_026

Changing Colour

sh_028

Merging windows

sh_029

sh_030

sh_031

Tis no greater joy…

Than having the guy whose tut you’re doing retweet you when flip out over his shader tut in C++. Hahaha. So awesome!

retweet

Conclusion

Man, I learned a lot, and this is fun! Definitely going to keep learning!

Written on May 16, 2017