1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 12:06:07 +08:00
Files
hl2sdk/materialsystem/stdshaders/depthwrite_ps2x.fxc
Scott Ehlert fdd0bbf277 SDK sync.
2012-07-06 20:35:59 -05:00

25 lines
490 B
Plaintext

// DYNAMIC: "ALPHACLIP" "0..1"
const float g_AlphaThreshold : register( c0 );
struct PS_INPUT
{
#if ALPHACLIP
float2 texCoord0 : TEXCOORD0;
#endif
};
sampler BaseTextureSampler : register( s0 );
float4 main( PS_INPUT i ) : COLOR
{
float4 color = float4( 1, 0, 0, 1 ); // opaque alpha....the color doesn't matter for this shader
#if ALPHACLIP
color = tex2D( BaseTextureSampler, i.texCoord0 );
clip( color.a - g_AlphaThreshold );
#endif
return color;
}