add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
38
gamedata/shaders/r3/fluid_obst_static_oobb.ps
Normal file
38
gamedata/shaders/r3/fluid_obst_static_oobb.ps
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include "fluid_common.h"
|
||||
|
||||
struct PSDrawBoxOut
|
||||
{
|
||||
float4 obstacle : SV_TARGET0;
|
||||
float4 velocity : SV_TARGET1;
|
||||
};
|
||||
|
||||
bool PointIsInsideBox(float3 p, float3 LBUcorner, float3 RTDcorner)
|
||||
{
|
||||
return ((p.x > LBUcorner.x) && (p.x < RTDcorner.x)
|
||||
&& (p.y > LBUcorner.y) && (p.y < RTDcorner.y)
|
||||
&& (p.z > LBUcorner.z) && (p.z < RTDcorner.z));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Pixel
|
||||
PSDrawBoxOut main( p_fluidsim_clip 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(obstVelocity.xyz,1);
|
||||
voxel.velocity = 0;
|
||||
return voxel;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue