This commit is contained in:
Vasily Petrov 2026-06-18 01:18:29 +03:00
commit 2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions

View file

@ -0,0 +1,29 @@
#include "fluid_common.hlsli"
struct PSDrawBoxOut
{
float4 obstacle : SV_TARGET0;
float4 velocity : SV_TARGET1;
};
// Pixel
PSDrawBoxOut main(p_fluidsim_dyn_aabb input)
{
PSDrawBoxOut voxel;
// cells completely inside box = 0.5
if ((input.clip0.x > BOX_EXPANSION) && (input.clip1.x > BOX_EXPANSION) &&
(input.clip0.y > BOX_EXPANSION) && (input.clip1.y > BOX_EXPANSION) &&
(input.clip0.z > BOX_EXPANSION) && (input.clip1.z > BOX_EXPANSION))
{
voxel.obstacle = 0.5;
voxel.velocity = 0;
return voxel;
}
else // cells in box boundary = 1.0
{
voxel.obstacle = 1.0;
voxel.velocity = float4(input.velocity, 1);
return voxel;
}
}