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.

65 lines
1.5 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "BaseVSShader.h"
  8. #include "screenspaceeffect_vs20.inc"
  9. #include "hsv_ps20.inc"
  10. #include "hsv_ps20b.inc"
  11. // NOTE: This has to be the last file included!
  12. #include "tier0/memdbgon.h"
  13. BEGIN_VS_SHADER_FLAGS( HSV, "Help for HSV", SHADER_NOT_EDITABLE )
  14. BEGIN_SHADER_PARAMS
  15. END_SHADER_PARAMS
  16. SHADER_INIT_PARAMS()
  17. {
  18. SET_FLAGS2( MATERIAL_VAR2_NEEDS_FULL_FRAME_BUFFER_TEXTURE );
  19. }
  20. SHADER_INIT
  21. {
  22. }
  23. SHADER_FALLBACK
  24. {
  25. return 0;
  26. }
  27. SHADER_DRAW
  28. {
  29. SHADOW_STATE
  30. {
  31. pShaderShadow->EnableTexture( SHADER_SAMPLER0, true );
  32. int fmt = VERTEX_POSITION;
  33. pShaderShadow->VertexShaderVertexFormat( fmt, 1, 0, 0 );
  34. DECLARE_STATIC_VERTEX_SHADER( screenspaceeffect_vs20 );
  35. SET_STATIC_VERTEX_SHADER( screenspaceeffect_vs20 );
  36. if( g_pHardwareConfig->SupportsPixelShaders_2_b() )
  37. {
  38. DECLARE_STATIC_PIXEL_SHADER( hsv_ps20b );
  39. SET_STATIC_PIXEL_SHADER( hsv_ps20b );
  40. }
  41. else
  42. {
  43. DECLARE_STATIC_PIXEL_SHADER( hsv_ps20 );
  44. SET_STATIC_PIXEL_SHADER( hsv_ps20 );
  45. }
  46. }
  47. DYNAMIC_STATE
  48. {
  49. pShaderAPI->BindStandardTexture( SHADER_SAMPLER0, TEXTURE_BINDFLAGS_NONE, TEXTURE_FRAME_BUFFER_FULL_TEXTURE_0 );
  50. DECLARE_DYNAMIC_VERTEX_SHADER( screenspaceeffect_vs20 );
  51. SET_DYNAMIC_VERTEX_SHADER( screenspaceeffect_vs20 );
  52. }
  53. Draw();
  54. }
  55. END_SHADER