| ▲ | Agentlien 2 days ago | |
As a graphics programmer this doesn't ring true to me. Using more readable names definitely helps during development. I think the cause of this is twofold. First, there's a lot of equations used in graphics programming where the canonical names of variables are single letters. If you know the formula a single letter is a good name and it is expected that others reading it also understand it - if you didn't you'd have to read up on the formula anyway. But beyond that I also think it's a bit of misguided pride. Thinking it's cool to have as minimal inscrutable shader code as possible because that's trendy. It's very common for shaders to be developed with reasonable names and good layout then rewritten before publishing like it was an IOCCC entry. | ||
| ▲ | jesse__ a day ago | parent [-] | |
> First, there's a lot of equations used in graphics programming where the canonical names of variables are single letters. If you know the formula a single letter is a good name and it is expected that others reading it also understand it - if you didn't you'd have to read up on the formula anyway. That's what I was getting at in my comment. A lot of the shader code I encounter is pretty math-y. The rest I'm not too sure about .. I don't come across a lot of shaders that are code-golf-y trying to optimize for least number of bytes, but, then again, the article did just that .. so .. :shrug: | ||