This commit is contained in:
Vasily Petrov 2026-06-18 01:18:29 +03:00
commit 2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions

View file

@ -0,0 +1,32 @@
#include "common.hlsli"
struct v2p
{
float2 tc0 : TEXCOORD0; // base
float4 c : COLOR0; // diffuse
#ifdef USE_SOFT_PARTICLES
// Igor: for additional depth dest
float4 tctexgen : TEXCOORD1;
#endif // USE_SOFT_PARTICLES
float4 hpos : SV_POSITION;
};
// Pixel
Texture2D s_distort;
float4 main(v2p I) : SV_Target
{
float4 distort = s_distort.Sample(smp_linear, I.tc0);
float factor = distort.w * dot(I.c.xyz, 0.3333f);
// #ifdef USE_SOFT_PARTICLES
// float4 Point = GbufferGetPoint(I.hpos.xy);
// float spaceDepth = Point.z - I.tctexgen.z;
// factor *= Contrast(saturate(spaceDepth * 1.3f), 2.0f);
// #endif // USE_SOFT_PARTICLES
return float4(distort.xyz, factor);
}