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.

21 lines
558 B

  1. //========== Copyright (c) Valve Corporation, All rights reserved. ==========//
  2. #include "common_ps_fxc.h"
  3. struct PS_INPUT
  4. {
  5. float4 projPos : POSITION;
  6. float3 zValue : TEXCOORD0;
  7. };
  8. const float3 g_ZFilter : register( c1 );
  9. const float3 g_ModulationColor : register( c2 );
  10. float4_color_return_type main( PS_INPUT i ) : COLOR
  11. {
  12. float z = dot( i.zValue, g_ZFilter );
  13. z = saturate( z );
  14. float4 color = float4( z, z, z, 1.0f );
  15. color.rgb *= g_ModulationColor;
  16. return FinalOutput( color, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
  17. }