Problem
Current branchless (1-obs) weight zeroes velocity inside obstacles but provides no explicit tangential (slip) condition at boundaries. A thin layer of incorrect velocity just outside text slightly distorts the flow path.
Proposed change
After the gradient-subtract pass, add a boundary-condition step:
- Compute obstacle gradient
∇obs via 2-tap finite difference of the obstacle texture — this gives the surface normal.
- For cells where
obs > 0 && obs < 0.5, subtract the normal component from velocity (project to tangential).
Acceptance criteria
Files likely touched: src/core/shaders.ts, src/core/wgsl-shaders.ts, src/core/simulation.ts
Problem
Current branchless
(1-obs)weight zeroes velocity inside obstacles but provides no explicit tangential (slip) condition at boundaries. A thin layer of incorrect velocity just outside text slightly distorts the flow path.Proposed change
After the gradient-subtract pass, add a boundary-condition step:
∇obsvia 2-tap finite difference of the obstacle texture — this gives the surface normal.obs > 0 && obs < 0.5, subtract the normal component from velocity (project to tangential).Acceptance criteria
simResolution=0.5Files likely touched:
src/core/shaders.ts,src/core/wgsl-shaders.ts,src/core/simulation.ts