←back to thread

201 points ibobev | 2 comments | | HN request time: 0.019s | source
Show context
reactordev ◴[] No.46198064[source]
I’m not a fan of the minified glsl that guys like this produce but I do get a chuckle when variable declarations spell out damnit. The frustrations are real.

That aside, i love the work, I just hate having to mentally grok the d and c style variables. As if number of chars minimum is the goal. Number of instructions yes, but we can do better than d and t.

Moonlight is beautiful.

replies(2): >>46199382 #>>46201680 #
jesse__ ◴[] No.46199382[source]
If there was some absolute measure of program 'interestingness'/'readability', programs found on shadertoy would no doubt have an asymptotically high score.

My theory is that graphics programmers, at some point, stop having to care very much about what the textual representation of their program actually looks like. Because graphics programming is so hard, once you get to the point of understanding what you're doing, and typing in the shader, it becomes self-explanatory; you don't actually need variable names, what you need is understanding.

Inigo Quilez (author of shadertoy, and graphics programming legend) is one of the most talented graphics programmers alive, and produces some of the least readable code I've ever seen.

Just my 2c on why this is so common in graphics, specifically

replies(3): >>46200163 #>>46201568 #>>46203264 #
1. reactordev ◴[] No.46200163[source]
I am a graphics programmer. It still enrages me to see those variables but (but) I understand that most of the time, it’s that way in the math. So the math variable becomes the shader variable name. Ugh. I love me a good float lut = lut_equation(uv, lutTex) * lut_factor.r
replies(1): >>46201079 #
2. jesse__ ◴[] No.46201079[source]
Fair enough :)