this post was submitted on 22 Aug 2023
115 points (97.5% liked)

Programming

17450 readers
117 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
115
The Human Shader (humanshader.com)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/programming
 

A GLSL shader computed painstakingly by hand by almost 2000 people

top 10 comments
sorted by: hot top controversial new old
[–] aport 23 points 1 year ago

/r/place on hard mode

[–] [email protected] 12 points 1 year ago (1 children)

So many people got it right that the ones who got it wrong really stand out

[–] [email protected] 2 points 1 year ago (1 children)

Most the errors were made earlier interestingly

[–] brian 2 points 1 year ago (1 children)

probably since later people could look at the partial image, see that pink wasn't a very likely color, and check their math until the result looked more correct

[–] [email protected] 1 points 1 year ago

I thought so but I also think they should've not been able to see the other pixels until it was done, since pixels are rendered in isolation(usually?)

[–] SittingWave 11 points 1 year ago (1 children)

It would be even nicer if we could click on a pixel and see the computations screenshot, so we can find the error.

[–] Marzepansion 4 points 1 year ago

He's making a video as a post mortem to this experiment, so it might still be released. But I can see why it would be better not to share them (aside from privacy/legal concerns as there was no such release agreement), some of the contributors used their real names, I may be one of them. It could be a bit shameful to see this attached to your real name. They might have submitted their initial draft and then, due to circumstances, could not update the results in the several hour window that was afforded to you.

Luckily my pixels look correct though.

[–] [email protected] 8 points 1 year ago

This concept is hilarious to me 😂

[–] Marzepansion 8 points 1 year ago (1 children)

I participated in this, have to say it was fun and it's been a thing I've said for years could make (at least) linear algebra lessons more interesting to young people. Shaders are the epitome of "imagery through math", and if something like this was included in my linear algebra classes I would have paid much more interest in school.

Funny now that this is my day job. I'm definitely looking forward to the video by IQ that is being made about this event.

To explain some of the error pixels: the way you got a pixel on the board was by elaborately writing down all operations in details (yes this included even simply multiplications), the goal wasn't if the pixel was correct or not, and depending on the location of your pixel the calculation could be a bit more complex, as long as you had written down your steps to get the result as detailed as possible.

More than likely simple mistakes were made in some of these people's calculations that made them take a wrong branch when dealing with conditionals. Hopefully the postmortem video will shed some light on these.

[–] [email protected] 2 points 1 year ago

I decided to translate the worksheet into GLSL code on shadertoy. It was really cool to see the gradients and sub-coordinate systems represented by the intermediate variables in the calculation. Smoke and mirrors. Maybe you might have some insight into some of the calculations. https://www.shadertoy.com/view/cllBzM