very nice tutorial. If I can make one suggestion is to write the shaders in a GLSL file format (i.e.: .vs, .fs) then just get the text value from it; that way you can get your editor to highlight the GSLS syntax, which is pretty helpful when dealing with complex shaders.
this not, by any means, the best way of doing it, but I felt it was a bit easier writing GLSL code.
When you’re writing graphics engines (at least from my experience in OpenGL) you tend to write the vertex and fragment shaders in different files and link them when you actually need to render something. That way you can use combinations of them. The vs or fs extension is used to understand which one it is at a glance.
While I was trying to learn computer graphics I came across those extensions. I find them easy to understand, cause you know what is in each file and your editor can understand the syntax, making it easier to spot mistakes, like `1. instead of 1` when the program expects as float.
this not, by any means, the best way of doing it, but I felt it was a bit easier writing GLSL code.
https://github.com/victorqribeiro/3Dengine/blob/master/js/Sh...