normalization work
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-12-17 18:26:05 -05:00
parent 64e13e2457
commit 10c7a6c0c0
3 changed files with 320 additions and 303 deletions

View File

@ -25,12 +25,12 @@
/** /**
* Diffusion constant * Diffusion constant
*/ */
#define FLUID_PRESSURECELL_DIFFUSION_CONSTANT 0.01f #define FLUID_PRESSURECELL_DIFFUSION_CONSTANT 0.001f
/** /**
* Viscosity constant * Viscosity constant
*/ */
#define FLUID_PRESSURECELL_VISCOSITY_CONSTANT 0.01f #define FLUID_PRESSURECELL_VISCOSITY_CONSTANT 0.001f
/** /**
* Amount of the residual to add to the pressure field each frame * Amount of the residual to add to the pressure field each frame

File diff suppressed because it is too large Load Diff

View File

@ -55,13 +55,13 @@ int fluid_sim_pressurecell_normalization_test1(){
// cell that originall had values // cell that originall had values
// //
expected = MAX_FLUID_VALUE; expected = MAX_FLUID_VALUE;
actual = currentChunk->d[CENTER_LOC][IX(1,1,1)]; actual = currentChunk->dTempCache[IX(1,1,1)];
if(fabs(expected - actual) > FLUID_PRESSURE_CELL_ERROR_MARGIN){ if(fabs(expected - actual) > FLUID_PRESSURE_CELL_ERROR_MARGIN){
rVal += assertEqualsFloat(expected,actual,"Failed to recapture density into (1,1,1)! expected: %f actual: %f \n"); rVal += assertEqualsFloat(expected,actual,"Failed to recapture density into (1,1,1)! expected: %f actual: %f \n");
} }
expected = MAX_FLUID_VALUE; expected = MAX_FLUID_VALUE;
actual = currentChunk->d[CENTER_LOC][IX(DIM-2,DIM-2,DIM-2)]; actual = currentChunk->dTempCache[IX(DIM-2,DIM-2,DIM-2)];
if(fabs(expected - actual) > FLUID_PRESSURE_CELL_ERROR_MARGIN){ if(fabs(expected - actual) > FLUID_PRESSURE_CELL_ERROR_MARGIN){
rVal += assertEqualsFloat(expected,actual,"Failed to recapture density into (DIM-2,DIM-2,DIM-2)! expected: %f actual: %f \n"); rVal += assertEqualsFloat(expected,actual,"Failed to recapture density into (DIM-2,DIM-2,DIM-2)! expected: %f actual: %f \n");
} }