Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
For(float e,I,a,w,x,g,h;I++<90.;o+=.01-.02/exp(max(s,e)*3e3)/h){vec3 p=vec3(( (twitter.com/zozuar)
49 points by denysvitali on Feb 13, 2024 | hide | past | favorite | 10 comments


Hot on the heels of https://news.ycombinator.com/item?id=39339249

Is there an explanation or an exposition that shows how these work and how one goes about making one?


Check out Inigo Quilez's channel, he's a veteran of these distance field sizecoding demos and has some good explainers.

https://www.youtube.com/playlist?list=PL0EpikNmjs2CYUMePMGh3...

You can also check out his Shadertoy page which has hundreds of examples with live-editable source code.

https://www.shadertoy.com/user/iq


All I got was

  ?SYNTAX ERROR
  READY.



Thanks!


Maybe gwbasic? :D


It's a C dialect of some kind, but not turbo c as it doesn't have a dot function. Perhaps GLSL?


I was joking - I believe the example error message was one from one of the old basic interpreters (I just honestly can’t recall if it was qbasic, c64 basic or what


I reckon you could port this to run on c64 basic quite easily. You'd probably only need to swap the rotate2d and dot functions with something else for it to work. It'd make for a fun weekend project. As for how fast it would run on the other hand ... ;)


Yes, it's GLSL.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: