techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

4.6K
active users

#glsl

11 posts10 participants0 posts today

My SDF-2D 3D-viewer is finally functional, so to celebrate I'm morphing my pacman/pie into a circle back and forth.

The shadertoy version is visible here: shadertoy.com/view/333XDH

(For the transform, since it's not present in this version of the code, it's basically a mix according to time between the pie and the sdf+gradient of a circle)

#FractalFriday (It's already Saturday)

Elephant valley of the Mobius Mandelbrot set.

Formula: \(z_{n+1}=f(z_n^2+c,1)\)

where \(f(z, a)\) is defined as (C-like pseudocode):

Complex f(Complex z, Real a) {
Real dist = abs(re(z)) - a;
if (re(z) > a) {
re(z) = -a + dist;
im(z) = -im(z);
} else if (re(z) < -a) {
re(z) = a - dist;
im(z) = -im(z);
}
return z;
}

Coloring is done by using three very similar colormaps, mapped to triangle inequality average values.
The final color is produced by interpolating between these three colors using the so called "atom domains".

Generated using my GLSL Shadertoy fractal generator: shadertoy.com/view/33sSRf

I think I'm done with it. I fixed the clipping and the colors.

I'm still not satisfied with the raymarch glitching a bit, especially on the summit edges. If someone has ideas to improve it, I shared it on shadertoy: shadertoy.com/view/333XDH

I believe that's because we're matching the exit edge of the shape when it's close, but I'm not exactly sure how to fix that. In any case, patch welcome :)

The box cut is not perfect but we're getting there!

Edit: also, fun stuff, I realized I could return transparent pixels, so the web page background takes over and it looks like the shape is floating on it. It's stupid but I love it :3

It's funny how simple and fast a basic raytracer can be.

I remember in my first year of IT school (2007-2008) when we had to implement one on CPU, and we had to wait several minutes for one picture to be rendered.

Of course this one is still very basic, but hey it's in real time baby

Sometimes (often) I have this mathematical urge, this instinct, to just name everything with one letter, then I switch to capitalized ones when I run out of them, and then I feel frustrated for not being able to use some Unicode character instead of pi, tau, phi, ...

This is honestly starting to frighten me, especially since I'm actually taking a liking to it.

This is a sickness, please help me.