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.

72 lines
1.7 KiB

  1. //===== Copyright (c) 1996-2007, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $Header: $
  6. // $NoKeywords: $
  7. //===========================================================================//
  8. #include "BaseVSShader.h"
  9. #include "debugmorphaccumulator_ps30.inc"
  10. #include "debugmorphaccumulator_vs30.inc"
  11. // NOTE: This has to be the last file included!
  12. #include "tier0/memdbgon.h"
  13. BEGIN_VS_SHADER_FLAGS( DebugMorphAccumulator, "Help for Debug Morph Accumulator", SHADER_NOT_EDITABLE )
  14. BEGIN_SHADER_PARAMS
  15. END_SHADER_PARAMS
  16. SHADER_INIT_PARAMS()
  17. {
  18. }
  19. SHADER_FALLBACK
  20. {
  21. if ( !g_pHardwareConfig->SupportsPixelShaders_3_0() )
  22. {
  23. return "Wireframe";
  24. }
  25. return 0;
  26. }
  27. SHADER_INIT
  28. {
  29. LoadTexture( BASETEXTURE );
  30. }
  31. SHADER_DRAW
  32. {
  33. SHADOW_STATE
  34. {
  35. pShaderShadow->EnableDepthTest( false );
  36. pShaderShadow->EnableDepthWrites( false );
  37. pShaderShadow->EnableCulling( false );
  38. pShaderShadow->FogMode( SHADER_FOGMODE_DISABLED, false );
  39. pShaderShadow->EnableTexture( SHADER_SAMPLER0, true );
  40. pShaderShadow->EnableSRGBWrite( false );
  41. pShaderShadow->VertexShaderVertexFormat( VERTEX_POSITION, 1, 0, 0 );
  42. DECLARE_STATIC_VERTEX_SHADER( debugmorphaccumulator_vs30 );
  43. SET_STATIC_VERTEX_SHADER( debugmorphaccumulator_vs30 );
  44. DECLARE_STATIC_PIXEL_SHADER( debugmorphaccumulator_ps30 );
  45. SET_STATIC_PIXEL_SHADER( debugmorphaccumulator_ps30 );
  46. }
  47. DYNAMIC_STATE
  48. {
  49. BindTexture( SHADER_SAMPLER0, TEXTURE_BINDFLAGS_NONE, BASETEXTURE );
  50. DECLARE_DYNAMIC_VERTEX_SHADER( debugmorphaccumulator_vs30 );
  51. SET_DYNAMIC_VERTEX_SHADER( debugmorphaccumulator_vs30 );
  52. DECLARE_DYNAMIC_PIXEL_SHADER( debugmorphaccumulator_ps30 );
  53. SET_DYNAMIC_PIXEL_SHADER( debugmorphaccumulator_ps30 );
  54. }
  55. Draw( );
  56. }
  57. END_SHADER