More stability work on cellular sim
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
662d9a83f2
commit
43ad5c3478
@ -14,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* Gravity transfer rate/threshold
|
* Gravity transfer rate/threshold
|
||||||
*/
|
*/
|
||||||
#define FLUID_CELLULAR_DIFFUSE_RATE_GRAV 0.11f
|
#define FLUID_CELLULAR_DIFFUSE_RATE_GRAV 0.5f
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimum density for lateral movement to occur
|
* Minimum density for lateral movement to occur
|
||||||
|
|||||||
@ -859,10 +859,10 @@ LIBRARY_API void fluid_cellular_simulate(Environment * environment){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(bounds[IX(nX,y,nZ)] <= BOUND_CUTOFF_VALUE){
|
if(bounds[IX(nX,y,nZ)] <= BOUND_CUTOFF_VALUE){
|
||||||
if(d[IX(nX,y,nZ)] <= MAX_FLUID_VALUE - FLUID_CELLULAR_DIFFUSE_RATE2 && d[IX(nX,y,nZ)] < d[IX(x,y,z)]){
|
if(d[IX(nX,y,nZ)] <= MAX_FLUID_VALUE - (FLUID_CELLULAR_DIFFUSE_RATE2 * 2) && d[IX(nX,y,nZ)] < d[IX(x,y,z)]){
|
||||||
float transfer = FLUID_CELLULAR_DIFFUSE_RATE2;
|
float transfer = FLUID_CELLULAR_DIFFUSE_RATE2;
|
||||||
if(d[IX(x,y,z)] < FLUID_CELLULAR_DIFFUSE_RATE2){
|
if(d[IX(x,y,z)] - d[IX(nX,y,nZ)] < FLUID_CELLULAR_DIFFUSE_RATE2){
|
||||||
transfer = d[IX(x,y,z)];
|
transfer = (d[IX(x,y,z)] - d[IX(nX,y,nZ)]) / 2.0f;
|
||||||
}
|
}
|
||||||
// if(realNeighborZ == 17 && realNeighborX == 8){
|
// if(realNeighborZ == 17 && realNeighborX == 8){
|
||||||
// printf("lateral\n");
|
// printf("lateral\n");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user