add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
20
gamedata/shaders/r3/fluid_vorticity.ps
Normal file
20
gamedata/shaders/r3/fluid_vorticity.ps
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "fluid_common.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Pixel
|
||||
float4 main( p_fluidsim input ) : SV_Target
|
||||
{
|
||||
float4 L = Texture_velocity1.SampleLevel( samPointClamp, LEFTCELL, 0 );
|
||||
float4 R = Texture_velocity1.SampleLevel( samPointClamp, RIGHTCELL, 0 );
|
||||
float4 B = Texture_velocity1.SampleLevel( samPointClamp, BOTTOMCELL, 0 );
|
||||
float4 T = Texture_velocity1.SampleLevel( samPointClamp, TOPCELL, 0 );
|
||||
float4 D = Texture_velocity1.SampleLevel( samPointClamp, DOWNCELL, 0 );
|
||||
float4 U = Texture_velocity1.SampleLevel( samPointClamp, UPCELL, 0 );
|
||||
|
||||
float4 vorticity;
|
||||
vorticity.xyz = 0.5 * float3( (( T.z - B.z ) - ( U.y - D.y )) ,
|
||||
(( U.x - D.x ) - ( R.z - L.z )) ,
|
||||
(( R.y - L.y ) - ( T.x - B.x )) );
|
||||
|
||||
return vorticity;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue