init
This commit is contained in:
commit
2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions
19
gamedata/shaders/d3d11/fluid_vorticity.ps.hlsl
Normal file
19
gamedata/shaders/d3d11/fluid_vorticity.ps.hlsl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include "fluid_common.hlsli"
|
||||
|
||||
// Pixel
|
||||
float3 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);
|
||||
|
||||
float3 vorticity = 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