init
This commit is contained in:
commit
2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions
32
gamedata/shaders/d3d11/particle.ps.hlsl
Normal file
32
gamedata/shaders/d3d11/particle.ps.hlsl
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include "common.hlsli"
|
||||
|
||||
struct v2p
|
||||
{
|
||||
float2 tc0 : TEXCOORD0;
|
||||
float4 c : COLOR0;
|
||||
|
||||
// Igor: for additional depth dest
|
||||
#ifdef USE_SOFT_PARTICLES
|
||||
float4 tctexgen : TEXCOORD1;
|
||||
#endif // USE_SOFT_PARTICLES
|
||||
|
||||
float4 hpos : SV_POSITION;
|
||||
float fog : FOG;
|
||||
};
|
||||
|
||||
// Pixel
|
||||
float4 main(v2p I) : SV_Target
|
||||
{
|
||||
float4 result = I.c * s_base.Sample(smp_base, I.tc0);
|
||||
|
||||
// Igor: additional depth test
|
||||
#ifdef USE_SOFT_PARTICLES
|
||||
float4 Point = GbufferGetPoint(I.hpos.xy);
|
||||
float spaceDepth = Point.z - I.tctexgen.z;
|
||||
result *= Contrast(saturate(spaceDepth * 1.3f), 2.0f);
|
||||
#endif // USE_SOFT_PARTICLES
|
||||
|
||||
clip(result.a - (0.01f / 255.0f));
|
||||
return PushGamma(lerp(fog_color, result, I.fog));
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue