Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
706 B

  1. #define HDRTYPE HDR_TYPE_NONE
  2. #include "common_ps_fxc.h"
  3. struct PS_INPUT
  4. {
  5. float2 texCoord0 : TEXCOORD0;
  6. float2 texCoord1 : TEXCOORD3;
  7. };
  8. sampler BaseTextureSampler : register( s0 );
  9. sampler DetailTextureSampler : register( s3 );
  10. const float4 g_OutlineColor : register( c0 );
  11. const float4 g_OutlineEnd : register( c1 ); // a comp
  12. const float4 g_OutlineStart : register( c2 ); // a comp
  13. float4 main( PS_INPUT i ) : COLOR
  14. {
  15. // Sample frames from texture 0
  16. float4 base= tex2D( BaseTextureSampler, i.texCoord0 );
  17. float4 detail=tex2D( DetailTextureSampler, i.texCoord1 );
  18. if ( detail.a < g_OutlineEnd.a )
  19. base = g_OutlineColor;
  20. base.a *= ( detail.a > g_OutlineStart.a );
  21. return base;
  22. }