You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IQ has added a new version of the polynomial smin to the article, could it be added here?
EDIT 5 years later - I have learnt that Media Molecule used the polynomial smin() presented here for their game "Dreams" (credited to Dave Smith), although their rewrote it in an equivalent but more efficient form to look like this: ...
As noted by Shadertoy user TinyTexel, this can be generalized to higher levels of continuity than the quadratic polynomail offers (C1), which might be important for preventing lighting artifacts. Moving on to a cubic curve gives us C2 continuity, and doesn't get a lot more expensive than the quadratic one anyways: ...
Code for the latter:
float smin(float a, float b, float k) {
float h = max(k-abs(a-b), 0.0)/k;
return min(a, b)-(h*h*h*k*(1.0/6.0));
}
The text was updated successfully, but these errors were encountered:
IQ has added a new version of the polynomial
smin
to the article, could it be added here?Code for the latter:
The text was updated successfully, but these errors were encountered: