Counter Strike : Global Offensive Source Code
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
733 B

  1. //========== Copyright (c) Valve Corporation, All rights reserved. ==========//
  2. #include "common_ps_fxc.h"
  3. struct PS_INPUT
  4. {
  5. float2 coordTap0 : TEXCOORD0;
  6. float4 vertexColor : TEXCOORD1;
  7. };
  8. float4 Constant_color : register( c0 );
  9. sampler TexSampler : register( s0 );
  10. float4 main( PS_INPUT i ) : COLOR
  11. {
  12. float flDepth = tex2D( TexSampler, i.coordTap0 ).r;
  13. flDepth = flDepth * Constant_color.x + Constant_color.y;
  14. float4 vOutputColor = float4( flDepth, flDepth, flDepth, 1.0f);
  15. // Slamming output alpha to 1.0f because screenspace_general always enables alpha testing (argh)
  16. vOutputColor.a = 1.0f;
  17. return FinalOutput( vOutputColor, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE ); //Constant_color;
  18. }