1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00
Files
hl2sdk/materialsystem/stdshaders/depthwrite_ps2x.fxc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
490 B
Plaintext
Raw Normal View History

2012-07-06 20:35:59 -05:00
// 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;
}