add flags for enabling parts of pressurecell sim
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
913962c7f0
commit
058aff6b31
@ -50,7 +50,7 @@
|
||||
/**
|
||||
* Set to 1 to clamp small density values to 0
|
||||
*/
|
||||
#define FLUID_PRESSURECELL_CLAMP_MIN_DENSITY 0
|
||||
#define FLUID_PRESSURECELL_ENABLE_CLAMP_MIN_DENSITY 0
|
||||
|
||||
/**
|
||||
* Cutoff after which density is clamped to zero while diffusing
|
||||
@ -92,5 +92,10 @@
|
||||
*/
|
||||
#define FLUID_PRESSURECELL_BOUND_PRESSURE FLUID_PRESSURECELL_MAX_PRESSURE
|
||||
|
||||
/**
|
||||
* Enables recapture
|
||||
*/
|
||||
#define FLUID_PRESSURECELL_ENABLE_RECAPTURE 1
|
||||
|
||||
|
||||
#endif
|
||||
@ -130,7 +130,7 @@ LIBRARY_API void pressurecell_diffuse_density(Environment * environment, Chunk *
|
||||
)
|
||||
) * a
|
||||
;
|
||||
if(FLUID_PRESSURECELL_CLAMP_MIN_DENSITY && densityTemp[IX(x,y,z)] < FLUID_PRESSURECELL_MIN_DENSITY_CLAMP_CUTOFF){
|
||||
if(FLUID_PRESSURECELL_ENABLE_CLAMP_MIN_DENSITY && densityTemp[IX(x,y,z)] < FLUID_PRESSURECELL_MIN_DENSITY_CLAMP_CUTOFF){
|
||||
densityTemp[IX(x,y,z)] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,7 +141,9 @@ LIBRARY_API void fluid_pressurecell_simulate(
|
||||
//uTemp->d
|
||||
Chunk * currentChunk = chunks[i];
|
||||
pressurecell_advect_density(environment,currentChunk);
|
||||
fluid_pressurecell_recapture_density(environment,currentChunk);
|
||||
if(FLUID_PRESSURECELL_ENABLE_RECAPTURE){
|
||||
fluid_pressurecell_recapture_density(environment,currentChunk);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user