summaryrefslogtreecommitdiff
path: root/src/modules/sparkler/v3f.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2019-10-14 14:58:37 -0700
committerVito Caputo <vcaputo@pengaru.com>2019-10-14 16:42:26 -0700
commit96a68810d21eeabf24985d9e07e897c6cb3aedd5 (patch)
treef59f39e39c260ff1d30619554e816c553fefc444 /src/modules/sparkler/v3f.h
parenta21f1febe29fbc2c7e00ff97913c04c247bfb95b (diff)
modules/flui2d: add 2D fluid dynamics simulation
This implements near verbatim the code found in the paper titled: Real-Time Fluid Dynamics for Games By Jos Stam It sometimes has the filename GDC03.PDF, or Stam_fluids_GDC03.pdf The density field is rendered using simple linear interpolation of the samples, in a grayscale palette. No gamma correction is being performed. There are three configurable defines of interest: VISCOSITY, DIFFUSION, and ROOT. This module is only threaded in the drawing stage, so basically the linear interpolation uses multiple cores. The simulation itself is not threaded, the implementation from the paper made no such considerations. It would be nice to reimplement this in a threaded fashion with a good generalized API, then move it into libs. Something where a unit square can be sampled for interpolated densities would be nice. Then extend it into 3 dimensions for volumetric effects...
Diffstat (limited to 'src/modules/sparkler/v3f.h')
0 files changed, 0 insertions, 0 deletions
© All Rights Reserved