ShaderLesson3 : Step 2 : "If x is between the two values, it will linearly interpolate between zero and one." Not linear..it's a cubic hermite (a la the noise wiki page), or s-curve or ease function.
Thanks, will fix.
Nice set of tutorials, simply written and nicely laid out.
Couple of suggestions:
1. The tutorials are using attribute, varying, etc. rather than #version, vertex layout descriptors, in/out, etc. Might be worth adding a more advanced lesson that covers layouts, uniform blocks, etc. and explains the differences between the core and compatibility profiles as far as shaders are concerned.
2. Explain the notion of the various built-in values, i.e. gl_Position, gl_FragColor, etc.
It's implicit and probably obvious to most people, but might be worth pointing them out.
Other than that looks very good to me, keep up the good work. I'll be adding this to my personal list of tutorials.
1. My Mac Snow Leopard only supports GL 2.1 and thus GLSL 120, so that's all I can use.
It's more than sufficient for advanced 2D games (the focus of this series), and core profile doesn't add too many things that aren't already present in extensions (e.g. framebuffers). For maximum support across versions (see Mac versions here
) you should not rely on the core profile. Minecraft stats
at one point listed only 51% of all users running OpenGL 3+.
Also, OpenGL ES (Android, iOS, WebGL) doesn't use GLSL 330, and often doesn't even support #version 120. I'm aiming for cross-platform code rather than bleeding edge.
At a later stage I may include an "appendix" that details some of the changes, such as in/out, "location" qualifier, etc.
2. Thanks, I will try to add more details on built-ins.