skip to Main Content
Introduction To Shader Programming

Introduction to shader programming

1. About this tutorial

In the past years when I started to learn about 3d programming and graphics I encountered many issues in the way information was presented. Several times I got frustrated by incomplete explanations or even erroneous ones and sometimes spent days trying to deeply understand different algorithms, math and hardware problems connected to this wonderful slice of technology that Computer Graphics is. This is in no way a bad thing, as persistence leads to mastery, but struggling with truncated information rarely does.

So, my motivation is simple. I will try my best to initiate you in GPU data flow, math notions and algorithms needed for shader programming as well as clearing the way for you to deeply understand all kind of cg techniques, so as you may transform yourself in the the game/media industry professional that you aspire to become, or to simply write great 3d applications. This tutorial (as well as this whole site) is in the process of becoming a web of cg-related information, with local resources as well as references to external ones for the benefit of the CG-passionate Community.

Every notion in this tutorial will be presented in as much detail as possible, with links to external resources(including mentioning chapters in books from renowned professionals), web sample applications, and also video tutorials when needed. This quality-over-quantity approach has one downside in the fact that posts will be rare at first as quality research requires time. As I am still learning there is the possibility that some tutorials may present at first mistakes or truncated information(yes, the very thing which I despise!), but I count on my fellow cg enthusiasts from in2gpu.com to help me sort them out, and in the same time, I invite all of you to open discussions regarding the presented information. The content will be continuously modified as I strive to offer you an ideal learning experience.

At first the technology used will be Unity3d’s ShaderLab which supports the Nvidia CG shading language. The recent controlled downfall, death and bury of Microsoft XNA Game Studio and Silverlight 5 has led to few alternatives which offer the possibility to implement shaders without heavy boilerplate coding. In time, the tutorial will be expanded to include other main shading languages like HLSL (which is similar to Nvidia CG) and GLSL.

I congratulate you for being curious and will do everything in my power to catalyze your CG-related passion.