\[ \begin{align} \rho \frac{Dv}{Dt} &= \rho g - \nabla p + \mu \nabla^2 v \\ \nabla \cdot v &= 0 \end{align} \]
Which basically means this:
\[ ma = f_{ext} + f_{pres} + f_{visc} \]
Turns into this:
\[ a = \frac{f_{ext} + f_{pres} + f_{visc}}{V_j \times \rho_j} \]
screenshots taken from: taichi 10_fluid_lagrangian
Smooth surface by filtering depth texture
Render depth texture and copy it to textures for read & write
Use Bilateral filter since it won’t smooth depth.
src
│ lib.rs
│ particle_system.rs
│ renderer.rs
| ...
│
├───particle_system
│ gpu_pass.rs
│ grid.rs
│ particles.rs
│ utils.rs
│
└───renderer
bind_group_layout_cache.rs
compute_pass_copy_depth.rs
compute_pass_depth_filter.rs
compute_pass_depth_filter_basic.rs
compute_pass_particle.rs
render_pass_depth.rs
render_pass_water.rs
Each pass struct contains lots of objects… (buffer, bind_group_layout, bind_group, pipeline_layout, pipeline, encoder, pass)
Sharing objects requires passing references everywhere… sometimes through the whole call stack…
Implement parallel bitonic sort algorithms with Rust and Wgpu.
[2024-04-12T09:56:02Z INFO bitonic_sort] Bitonic sort successful!
[2024-04-12T09:56:02Z INFO bitonic_sort] Initialization takes: 0.4548751s
[2024-04-12T09:56:02Z INFO bitonic_sort] Wgpu computation takes: 0.0055504s
[2024-04-12T09:56:02Z INFO bitonic_sort] Data transfer takes: 0.0001467s
[2024-04-12T09:56:02Z INFO bitonic_sort] CPU sorting takes: 0.000011s
[2024-04-12T09:57:18Z INFO bitonic_sort] Bitonic sort successful!
[2024-04-12T09:57:18Z INFO bitonic_sort] Initialization takes: 0.4637676s
[2024-04-12T09:57:18Z INFO bitonic_sort] Wgpu computation takes: 0.0214897s
[2024-04-12T09:57:18Z INFO bitonic_sort] Data transfer takes: 0.0005794s
[2024-04-12T09:57:18Z INFO bitonic_sort] CPU sorting takes: 0.0217035s
[2024-04-12T21:33:44Z INFO bitonic_sort] Bitonic sort successful!
[2024-04-12T21:33:44Z INFO bitonic_sort] Initialization takes: 0.3913661s
[2024-04-12T21:33:44Z INFO bitonic_sort] Wgpu computation takes: 0.0090767s
[2024-04-12T21:33:44Z INFO bitonic_sort] Data transfer takes: 0.000544s
[2024-04-12T21:33:44Z INFO bitonic_sort] CPU sorting takes: 0.0098242s
[2024-04-12T09:53:07Z INFO bitonic_sort] Bitonic sort successful!
[2024-04-12T09:53:07Z INFO bitonic_sort] Initialization takes: 0.9346608s
[2024-04-12T09:53:07Z INFO bitonic_sort] Wgpu computation takes: 0.1369619s
[2024-04-12T09:53:07Z INFO bitonic_sort] Data transfer takes: 0.9909169s
[2024-04-12T09:53:07Z INFO bitonic_sort] CPU sorting takes: 4.1491945s
Special thanks to: