init
This commit is contained in:
commit
2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions
22
gamedata/shaders/d3d11/fluid_gaussian.ps.hlsl
Normal file
22
gamedata/shaders/d3d11/fluid_gaussian.ps.hlsl
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include "fluid_common.hlsli"
|
||||
|
||||
// Pixel
|
||||
float4 main(p_fluidsim input) : SV_Target
|
||||
{
|
||||
if (IsNonEmptyCell(input.texcoords.xyz))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
float dist = length(input.cell0 - center.xyz) * size;
|
||||
// float dist = length( input.cell0 - center ) * size / 2;
|
||||
float4 result;
|
||||
// result.rgb = splatColor; // + sin(splatColor.rgb*10.0+cell*5.0)*0.2;
|
||||
result.rgb = splatColor.xyz + length(splatColor) * sin(splatColor.xyz * 10.0 + input.cell0 * 5.0) * 0.2;
|
||||
// result.a = exp( -dist*dist/(0.05) );
|
||||
// result.a = exp( -dist*dist );
|
||||
result.a = exp(-dist * dist / 0.5);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue