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.

23 lines
615 B

  1. //========== Copyright (c) Valve Corporation, All rights reserved. ==========//
  2. #include "common_ps_fxc.h"
  3. sampler InputTexture : register( s0 );
  4. sampler Albedo : register( s1 );
  5. sampler Normal : register( s2 );
  6. struct PS_INPUT
  7. {
  8. float2 texCoord : TEXCOORD0;
  9. };
  10. float4 main( PS_INPUT i ) : COLOR
  11. {
  12. float3 normal = tex2D( Normal, i.texCoord );
  13. float good = dot( normal, normal ) > 0.9;
  14. float3 input=tex2D( InputTexture, i.texCoord );
  15. float3 albedo=tex2D( Albedo, i.texCoord );
  16. input=lerp( albedo, input, good );
  17. return FinalOutput( float4(input.xyz,1), 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
  18. }