Questions at the end: (sorry for not repeating them) 41:56 Are all your shaders using raymarching? How hard will be to interface with something that's using vertex arrays or the depth buffer? 42:45 If you look at the generated assembly code, I wonder how much the compiler takes the generated stuff and optimizes it? [...] The question is more for the complicated changes - would you get much more efficient performance with a good arch optimizer or you haven't looked into that? 44:04 How about running those unions for swizzling - would it cause any problems for debugging? [...] NOTE: the person talks about issues he has with GLM that's why I joke to use my library 45:38 What if you wanted to do texture sampling? 46:15 What's the performance on a GPU? 47:46 I might be getting myself mixed up with the more complicated shader behavior from GLSL 1 - Was it tricky at any points to make sure that you match the math functions from the shader really closely?
There's pros and cons to running GLSL on the CPU, but it sure has its uses and I am excited to see your approach to teaching C++ about shaders. I have been using GLM for quite some time and think it's great, but I can see how your code would clearly outperform it. Cool stuff.