OpenGL ES 2.0: Trying to demystify shaders
Does learning about shaders make you a programmer? Gosh, I don’t know, but I sure feel like it trying to get through this book. I have been getting comfortable at my new job, as well as getting an apartment - so that will mean more time for 3d stuff.
I am starting to notice that a lot of 3d games/simulations all have the same look to them when they are done by “amateurs”. I include myself in this of course.
Unity3D has ShaderLab and the ability to do CG programming for its shaders, but I wanted a more universal language for my foundation. Not only is OpenGL a cross-platform standard for computers, but it is also a standard for cell phones and HTML5. I am sure concepts will be similar once I can get good at one, so picking up Unity3D’s implementation of shaders should be easier. That is why I chose this route.
Sure, gameplay is what really matters, but having a distinctive art style can really give a 3d world the edge needed to turn some heads. The art style and the “atmosphere” of a 3d world has a lot to do with shaders.
Here are 6 points of wisdom if you try to learn the mystical world of shaders.
-
Limit your reading every day. The more time you spend looking at it with a rested mind, the faster the concepts will solidify.
-
Repetition creates comfort. The first time you read something difficult, it is going to be overwhelming. Just come back to it tomorrow and read the same thing. I promise it will make more sense the next day.
-
Look at code in a different format. If you just stare at an example that the book gives, it is harder to really understand it. This book has multiple formats that you can download the code in for example.
-
Relax. Getting frustrated is only going to slow you down. It isn’t a race. Just come back later with a fresh mind and act like it is the first time you read it.
-
Keep it in perspective. Since shaders can talk about very micro-level things like manually creating buffers and concepts like invariance, try to see the big picture and how the parts will help in the long run.
-
Don’t compare yourself. Like everything in life, there will be people way better than you, and others who pale in comparison to your skills. All that matters is competing with yourself every day and getting better.
Reading through about 40% of this book, I have a theory on why shaders are so difficult. Shader programming is so difficult because of how highly conceptual it is. No concepts are really tangible or observable - until you know it and can complete the whole process. I read about 30-40 minutes from the book every morning — and so much of it hinges on low level programming and how the graphics cards process everything.
With a little self-discipline, patience, and a desire to learn, I am sure that anyone can learn how to be comfortable with shaders.
Next
I will finish the OpenGL book and start to dive into shaders with Unity. I also need to beef up my art skills more, so I might be taking a technical break for a little bit and doing more environmental concept art stuff.
Page Contents

I mostly keep this blog to help me remember things. Writing is also a great way to understand things at a deeper level. I would highly recommend it if you don't write at all.