more fudging pressure numbers
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-01-19 17:12:39 -05:00
parent 2394ae248d
commit b0d1a52311
2 changed files with 8 additions and 3 deletions

View File

@ -75,7 +75,12 @@
/** /**
* Percentage of presure to keep from last frame * Percentage of presure to keep from last frame
*/ */
#define FLUID_PRESSURECELL_PRESSURE_BACKDOWN_FACTOR 0.0f #define FLUID_PRESSURECELL_PRESSURE_BACKDOWN_FACTOR 1.0f
/**
* Percentage of divergence to keep from last frame
*/
#define FLUID_PRESSURECELL_DIVERGENCE_BACKDOWN_FACTOR 1.0f
/** /**
* Pressure added on recapturing fluid pushed into borders * Pressure added on recapturing fluid pushed into borders
@ -99,7 +104,7 @@
/** /**
* Enables recapture of density when velocity pushes it outside of bounds * Enables recapture of density when velocity pushes it outside of bounds
*/ */
#define FLUID_PRESSURECELL_ENABLE_RECAPTURE 0 #define FLUID_PRESSURECELL_ENABLE_RECAPTURE 1
/** /**
* Enables clamping small density values to 0 * Enables clamping small density values to 0

View File

@ -85,7 +85,7 @@ LIBRARY_API void pressurecell_approximate_pressure(Environment * environment, Ch
for(z = 0; z < DIM; z++){ for(z = 0; z < DIM; z++){
for(y = 0; y < DIM; y++){ for(y = 0; y < DIM; y++){
for(x = 0; x < DIM; x++){ for(x = 0; x < DIM; x++){
phi0[IX(x,y,z)] = divCache[IX(x,y,z)]; phi0[IX(x,y,z)] = divCache[IX(x,y,z)] * FLUID_PRESSURECELL_DIVERGENCE_BACKDOWN_FACTOR;
pressureTemp[IX(x,y,z)] = pressureCache[IX(x,y,z)] * FLUID_PRESSURECELL_PRESSURE_BACKDOWN_FACTOR; pressureTemp[IX(x,y,z)] = pressureCache[IX(x,y,z)] * FLUID_PRESSURECELL_PRESSURE_BACKDOWN_FACTOR;
// pressureTemp[IX(x,y,z)] = 0; // pressureTemp[IX(x,y,z)] = 0;
if(divCache[IX(x,y,z)] > DIVERGENCE_WARNING_VALUE){ if(divCache[IX(x,y,z)] > DIVERGENCE_WARNING_VALUE){