I saw this question, which is asking if there's any technical reason why some shader source uses cryptic variable names (like
bn instead of
I haven't done much shader programming before, but I have an idea of why that might be the case; based on my (extremely limited) understanding, the shader source has to be sent to the GPU to be compiled. Because the GPU has to have all of the source of a shader before compiling it, using smaller variable names reduces the number of bytes that need to be sent to the GPU. This would either reduce the time it takes to compile the shader, or reduce the time it takes for the shader to become usable.
However, I don't know if it's true. It's more of maybe-a-step-in-maybe-the-right-direction. It's also possible that unless the shader source is very large, most RAM/CPU/GPU interactions would be too fast to notice.
Should I give an answer, that I think might be the right answer, even though I don't know for sure?