I’m only just getting into GLSL after coming across from writing pixel shaders in Adobe PixelBender. I have written a few fractal shaders that are just a single quad with the fragment shader doing all the heavy lifting.
There are quite a lot of calculations that are the same for all pixels that I’m currently doing in the fragment shader by assigning local fragment variables (like creating rotation matrices).
Am I right in thinking that all calculations in the fragment shader will be repeated for every pixel, whereas if I were to move the common ones into the vertex shader then they would only be calculated once per vertex?
Thanks for any help, as it’s obvious I am still very new to this