fix: distance_field_generator now takes the ball_radius as input parameter instead of hardcoded offset

This commit is contained in:
2026-04-11 15:27:29 +02:00
parent a1a6ba4c34
commit 2b9c503c9e
3 changed files with 11 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ float getBallInfluence(vec2 pos, vec2 center, float radius) {
float getShapeInfluence(vec2 pos) {
vec2 uv = pos / resolution;
uv.y = 1 - uv.y + 0.045; // invert y and offset to match with wallpaper texture
uv.y = 1.0 - uv.y;
if (any(lessThan(uv, vec2(0.0))) || any(greaterThan(uv, vec2(1.0)))) {
return 0.0;