File tree Expand file tree Collapse file tree
plugin/src/Caelestia/Blobs/shaders Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,8 +197,13 @@ void main() {
197197 // Screen-space center (with offset) and pre-computed AABB half-extents
198198 vec2 ctr = rect.xy + sinkProps.yz;
199199
200- // Delay sink to absorb smin blend depth (circular smin max = (sqrt(2)-1)*k)
201- float preOff = smoothFactor * (sqrt (2.0 ) - 1.0 );
200+ // Sink onset / residual overlap: how far a rect must penetrate the border before
201+ // the inner wall recedes to form its pocket. Too low and the wall recedes faster
202+ // than the junction can stay convex, denting the inner edge inward near the rect's
203+ // (squared) corners; too high and the rect nestles too deep before the wall yields.
204+ // Tuned between the old cubic blend depth (k/6, too shallow) and the circular blend
205+ // depth ((sqrt2-1)k): half the circular smin gap-closing distance, (2-sqrt2)k/2.
206+ float preOff = smoothFactor * (2.0 - sqrt (2.0 )) * 0.5 ;
202207
203208 // Top border: track rect's BOTTOM edge, only within border thickness
204209 float topPen = clamp (innerTop - (ctr.y + sinkSh.y) - preOff, 0.0 , innerTop - outerTop);
You can’t perform that action at this time.
0 commit comments