init
This commit is contained in:
commit
2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions
21
gamedata/shaders/d3d11/fluid_advect_vel.ps.hlsl
Normal file
21
gamedata/shaders/d3d11/fluid_advect_vel.ps.hlsl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "fluid_common.hlsli"
|
||||
|
||||
float GravityBuoyancy;
|
||||
|
||||
// Pixel
|
||||
float4 main(p_fluidsim input) : SV_Target
|
||||
{
|
||||
float3 npos = GetAdvectedPosTexCoords(input);
|
||||
|
||||
float4 Velocity = Texture_velocity0.SampleLevel(samLinear, npos, 0) * modulate;
|
||||
|
||||
#ifdef USE_GRAVITY
|
||||
|
||||
float Dencity = Texture_color.SampleLevel(samLinear, npos, 0).x;
|
||||
Velocity.y += Dencity * GravityBuoyancy;
|
||||
|
||||
#endif // USE_GRAVITY
|
||||
|
||||
return Velocity;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue