My overall goal for the year is to —finally— learn...
# devlog-together
i
My overall goal for the year is to —finally— learn how to do real work on the GPU. As a motivating short-term goal, I'm building a visualization of magnetic fields, as VFX for a video about regenerative braking that my company is producing. I'm doing all this (bear with me) inside a new drawing app that I'm developing, which heretofore rendered to SVG, but which I'd like to abstract so that it can render in a more API-agnostic way, as a prelude to making it portable (with an eye to Swift+Metal, perhaps eventually Vision Pro). Then (continue to bear with me) I'll have a nice foundation for continuing some of my visual programming experiments. So no, these screenshots here aren't strictly FoC-relevant. But it is stuff that I'm building as a test case… within a new graphics tech stack that I'm building… with a goal of supporting some new visual programming stuff that I'd like to do. I won't be posting much stuff here until it becomes more directly FoC relevant, but if you'd like to follow along regardless I'll be posting more regularly on Mastodon.
l
niiiiiiiiiiiiiice
j
O, boy, do I have some goodies for you in my talk in September…
i
You tease!
c
You might find this video interesting; it has some good stuff on writing GPU shaders:

https://www.youtube.com/watch?v=f4s1h2YETNY&list=WL&index=2&t=14s

i
@Chris Maughan — Good summary of the basics, yep! One thing I learned from it — there's a
step()
function, which is like
smoothstep()
but, like, not smooth! Who knew :)
c
I like the way he explains the maths, I hope he will continue the series.
If you want something more advanced; this is amazing:

https://www.youtube.com/watch?v=8--5LwHRhjk&list=FLp2beo3KhDaAhSPh3AX6xQw&index=43

i
Yep, really familiar with IQ's work, but I appreciate the reference nonetheless. I needed some sdf shapes for this project, and you can bet where I went to grab those formulas :)
c
He's amazing; I'd like to include some of his SDF math shapes in my own tool, but he is quite specific about that code not being free to use; I should just get around to asking him.
i
I mean… I don't think he could stake a claim to, say,
length(p) - r
Also — "all code snippets you'll find are under the MIT license so you can easily reuse them."
j
IIRC he had a freakout at one stage because he was worried that people might use his tutorials to learn how to produce work minted as NFTs, which were being vilified as massively environmentally destructive.
c
@Ivan Reese I'm referring to this: https://www.shadertoy.com/view/Xds3zN And specifically: Copyright Inigo Quilez, 2016 - https://iquilezles.org/ // I am the sole copyright owner of this Work. // You cannot host, display, distribute or share this Work in any form, // including physical and digital. You cannot use this Work in any // commercial or non-commercial product, website or project. You cannot // sell this Work and you cannot mint an NFTs of it. // I share this Work for educational purposes, and you can link to it, // through an URL, proper attribution and unmodified screenshot, as part // of your educational material. If these conditions are too restrictive // please contact me and we'll definitely work it out. To be fair, he does say 'contact me'... The shapes on the that page are what I'm interested in; he has a nice set of construction components.
He may have said 'MIT' elsewhere, but not actually in the code...