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 brickNormal).

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?

Thanks for asking about this in meta.

This really boils down to this other question:

Are you ready to lose rep if the answer is wrong?

If you're ready to take the risk, then sure, go for it!

But if your reputation is important to you and you feel like you would be gambling by posting an answer along those lines, then you should probably not answer. This would be the case for instance if you had answered a lot of questions and your answers were generally received badly by the community (i.e. you have lots of downvotes, you deleted a lot of your answers, etc.).

This latter example does not look like it's your case, though.


Keep in mind that if your receive a downvote, you 'only' lose 2 rep, which is not much, and if you realize that the answer is wrong from the downvotes, you can always delete it to save your public image :P

  • 1
    You can also edit the answer to improve it in response to community feedback! Users can choose to reverse their downvotes if you edit your questions or answers. – DMGregory Sep 27 at 18:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .