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.

62 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 "gamecontrols_vs20.inc"
  9. #include "gamecontrols_ps20.inc"
  10. BEGIN_VS_SHADER_FLAGS( GAMECONTROLS, "Help for Game Controls", SHADER_NOT_EDITABLE )
  11. BEGIN_SHADER_PARAMS
  12. END_SHADER_PARAMS
  13. SHADER_INIT_PARAMS()
  14. {
  15. SET_FLAGS( MATERIAL_VAR_TRANSLUCENT );
  16. SET_FLAGS( MATERIAL_VAR_NOCULL );
  17. SET_FLAGS( MATERIAL_VAR_IGNOREZ );
  18. }
  19. SHADER_INIT
  20. {
  21. LoadTexture( BASETEXTURE );
  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 nTexCoordDimensions = 3;
  33. pShaderShadow->VertexShaderVertexFormat( VERTEX_POSITION | VERTEX_COLOR, 1, &nTexCoordDimensions, 0 );
  34. EnableAlphaBlending( SHADER_BLEND_SRC_ALPHA, SHADER_BLEND_ONE_MINUS_SRC_ALPHA );
  35. DECLARE_STATIC_VERTEX_SHADER( gamecontrols_vs20 );
  36. SET_STATIC_VERTEX_SHADER( gamecontrols_vs20 );
  37. DECLARE_STATIC_PIXEL_SHADER( gamecontrols_ps20 );
  38. SET_STATIC_PIXEL_SHADER( gamecontrols_ps20 );
  39. }
  40. DYNAMIC_STATE
  41. {
  42. BindTexture( SHADER_SAMPLER0, TEXTURE_BINDFLAGS_NONE, BASETEXTURE );
  43. DECLARE_DYNAMIC_VERTEX_SHADER( gamecontrols_vs20 );
  44. SET_DYNAMIC_VERTEX_SHADER( gamecontrols_vs20 );
  45. DECLARE_DYNAMIC_PIXEL_SHADER( gamecontrols_ps20 );
  46. SET_DYNAMIC_PIXEL_SHADER( gamecontrols_ps20 );
  47. }
  48. Draw();
  49. }
  50. END_SHADER