diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /materialsystem/stdshaders/alphadist_ps11.fxc | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'materialsystem/stdshaders/alphadist_ps11.fxc')
| -rw-r--r-- | materialsystem/stdshaders/alphadist_ps11.fxc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/alphadist_ps11.fxc b/materialsystem/stdshaders/alphadist_ps11.fxc new file mode 100644 index 0000000..cab3765 --- /dev/null +++ b/materialsystem/stdshaders/alphadist_ps11.fxc @@ -0,0 +1,27 @@ +#define HDRTYPE HDR_TYPE_NONE +#include "common_ps_fxc.h" + +struct PS_INPUT +{ + float2 texCoord0 : TEXCOORD0; + float2 texCoord1 : TEXCOORD3; +}; + +sampler BaseTextureSampler : register( s0 ); +sampler DetailTextureSampler : register( s3 ); + +const float4 g_OutlineColor : register( c0 ); +const float4 g_OutlineEnd : register( c1 ); // a comp +const float4 g_OutlineStart : register( c2 ); // a comp + +float4 main( PS_INPUT i ) : COLOR +{ + // Sample frames from texture 0 + float4 base= tex2D( BaseTextureSampler, i.texCoord0 ); + float4 detail=tex2D( DetailTextureSampler, i.texCoord1 ); + if ( detail.a < g_OutlineEnd.a ) + base = g_OutlineColor; + base.a *= ( detail.a > g_OutlineStart.a ); + return base; +} + |