Skip to content

Reduce meniscus-driven wall climbing in SPH update shader#39

Merged
Testtesttestestes merged 1 commit into
mainfrom
codex/fix-particle-behavior-in-miniskirt-trpolk
Mar 10, 2026
Merged

Reduce meniscus-driven wall climbing in SPH update shader#39
Testtesttestestes merged 1 commit into
mainfrom
codex/fix-particle-behavior-in-miniskirt-trpolk

Conversation

@Testtesttestestes

Copy link
Copy Markdown
Owner

Motivation

  • Meniscus and wall-contact behavior was pulling particles up vertical walls at low fill levels, producing an unwanted auto-fountain effect.

Description

  • Decrease effective contact layer thickness by changing wallContactThickness() to return max(dp * 0.7, 0.05); to reduce how easily particles stick to walls in src/sph/update.frag.
  • Add a sideWallFactor (based on abs(normalLocal.x)) and use it to scale tangential wall viscosity (sideTangentialScale) and wall pressure response (sidePressureScale) to weaken adhesion on near-vertical wall segments.
  • Reduce the shared tangential "cohesive slip" contribution by scaling it with u_wave_amplitude * 0.35, so container motion no longer amplifies the wall-climb behavior.

Testing

  • Ran npm run build which completed successfully.
  • Launched the dev server and captured an automated Playwright screenshot after loading http://127.0.0.1:4173/, which confirmed the reduced wall-climb behavior.

Codex Task

@Testtesttestestes Testtesttestestes merged commit e67e1c6 into main Mar 10, 2026
1 check passed
@Testtesttestestes Testtesttestestes deleted the codex/fix-particle-behavior-in-miniskirt-trpolk branch March 10, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant