Skip to content

"Blazingly fast", customizable, GPU-based heightfield fluid solver.

License

Notifications You must be signed in to change notification settings

Fanatrick/GMFlux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GMFlux 1.0.0

About

GMFlux is a height-field fluid simulation solver written in GML2.3+ and GLSL-ES 1.0

Contents

GMFlux comes with a packaged .yyp consisting of:

  • Main solver library GMFlux/gmflux_lib.gml
  • Adaptive LOD mesh processor GMFlux/gmflux_mesh.gml
  • GLSL-ES shader backend GMFlux/glsl-es/
  • Example VTF-based renderer Example/
    • !NOTICE! Due to an issue with GM:Studio's sampler bindings, ANGLE doesn't transpile vertex texture fetching operations. Currently the example renderer only works with VTF-supported platforms.
    • If you're using a VTF extension for desktop, this also means ANGLE will whine and won't compile across HLSL platforms without additional configurations

Instructions

  • git clone this repo or download from releases.
  • Open GMFlux.yyp with GM:Studio IDE (2.3+).
  • Refer to Example/Object1 for additional instructions.

Features

Blazingly fast GPU-based height-field fluid solver.

Process huge overworld simulations, as well as instanced pools

Dynamic manipulation of terrain, depth and flow via render-target approach (akin to `surface_set_target()`)

Optimized fragment lookups and RGBA decoding allowing the CPU to process physics like buoyancy, flow, etc.

Dynamic ripples, waves, foam, wet surfaces, rain, caustics and fresnel reflections

Customizable color, opacity, reflection, fade, fall-off and more

Todo

  • Desktop VTF extension
  • Switch the FluxCell.FluxLD and FluxCell.FluxRU encoding to each handle one dimension (sample same index for each dimension instead of this multi-sampled horror)
  • Projected instead of embedded caustics
  • Implement optional, even more detailed inter-cardinal flux
  • Implement additional fragment lookup method relying on vertex indexing instead of passed uniforms
  • Multi-pass the flux step
  • Replace the scuffed vec4 encoding
  • Navier-Stokes alternative advection solver
  • HLSL backend
  • Feather compliance
  • Better docs and better, more documented example

Credits: