Fun with shaders

While slowly moving toward modernizing the OpenGL used in praxis, I discovered that playing with shaders in OpenGL just requires a few fairly straight-forward function calls, so I’ve added the ability to define and use shaders in praxis.

Version: 445f789

Working directory: syntax2015continued


airplane.followcam = false

Then hit F1 and move the camera over to one of the beachballs in the sky. You can change the definition of the shader in beachball.lua and hit F1 to see the effect. In addition to beachball.lua, there are 2 other example shaders: toyball.lua and checkerboard.lua. These shaders are the example shaders from the book OpenGL SuperBible, 4th Edition.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s