3 ms·
Checkout this video by the author. It makes a full 3d complex scene out of a math formula, with step by step explanation https://youtu.be/8--5LwHRhjk https://yo
by lligallo 6y ago
Checkout this video by the author. It makes a full 3d complex scene out of a math formula, with step by step explanation
https://youtu.be/8--5LwHRhjk https://youtu.be/8--5LwHRhjk
- tconley 6y agomaybe i should have paid more attention in math class
- Edmond 6y agonot quite the same but if you're into math as art, try desmos: https://www.desmos.com/calculator/ccoiiocfbw https://www.desmos.com/calculator/ccoiiocfbw
- rantwasp 6y agothis will blow your mind: https://reddit.com/r/desmos/comments/gccqty/a_b%C3%A9zier_night/ https://reddit.com/r/desmos/comments/gccqty/a_b%C3%A9zier_ni... source: https://www.desmos.com/calculator/nhyta2fb68 https://www.desmos.com/calculator/nhyta2fb68
- dmix 6y agoWatching this reminds me of trying to use the 'golden ratio' and other mathy formulas in CSS typography and column grids to get "perfect" alignments from scratch. For ex from film: arranging the body to the min(d1, d2) alignment to the head sphere. But obviously this is on a whole other level of knowledge and complexity.
- devmunchies 6y agoHe links to shadertoy[1] with the code. it looks like the code is in C? how is it rendering in the browser? [1]: https://www.shadertoy.com/view/WsSBzh https://www.shadertoy.com/view/WsSBzh
- detaro 6y agoIt's not C, it's GLSL shader language, which is used in the browser through WebGL.
- coldtea 6y ago>it looks like the code is in C? how is it rendering in the browser? Plus, C could be compiled into WASM with emscripten, and be hooked to render on a Canvas or WebGL or something.
- Netcob 6y agoYou write GLSL, which is a shader language. Specifically, in this case, you write code that determines the color of a pixel given its coordinates (and some other input variables). On Shadertoy, they use WebGL to create a little rendering pipeline that in the simplest configuration renders two triangles to form a rectangle, using your GLSL code. Since it's WebGL (should be supported by all modern browsers, mobile included), that code is executed directly on your GPU. In more complex Shadertoy scenarios, you can do multiple passes where you render to different buffers and then use those buffers as textures in other passes. One of the uses of that is keeping state between frames, which would not be possible in a purely shader-based system otherwise. For example, if you have some sort of player character you move around the world, you may use one pixel to store the position, another to store the rotation and so on. Or you can use the image output from the previous frame as the input for the next frame to compute IIR functions, simulate cellular automatons and so on. I think by now you can even render to cube maps and multiple viewports (for VR). There's even a "sound" shader you can write that is called once and then renders a waveform for one minute and then plays that back while displaying the regular shader.
- AceJohnny2 6y agoOh, it's Inigo Quilez He's known as "iq" in Shader circles and is basically a god. He's also the (co?)creator of Shadertoy.com