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.

38 lines
790 B

  1. #include "common_ps_fxc.h"
  2. #include "common_fog_ps_forcevertexfog_fxc.h"
  3. struct PS_INPUT
  4. {
  5. float4 projPos : POSITION; // Projection-space position
  6. #if ( !HARDWAREFOGBLEND )
  7. // This is simply a blend between black and the fog color. Go ahead and send alpha through so that we can keep the pixel shader down to one instruction.
  8. float4 color : TEXCOORD0;
  9. #endif
  10. #if defined( _X360 )
  11. float2 vScreenPos : VPOS;
  12. #endif
  13. };
  14. float4_color_return_type main( PS_INPUT i ) : COLOR
  15. {
  16. #if ( HARDWAREFOGBLEND )
  17. {
  18. return float4_color_return_type( 0.0f, 0.0f, 0.0f, 1.0f );
  19. }
  20. #else
  21. {
  22. float4_color_return_type vColor = i.color;
  23. #if ( defined( _X360 ) )
  24. {
  25. vColor.xyz += ScreenSpaceOrderedDither( i.vScreenPos );
  26. }
  27. #endif
  28. return vColor;
  29. }
  30. #endif
  31. }