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.

112 lines
2.6 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  3. #include "shaderlib/cshader.h"
  4. class debugdrawdepth_vs20_Static_Index
  5. {
  6. public:
  7. // CONSTRUCTOR
  8. debugdrawdepth_vs20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  9. {
  10. }
  11. int GetIndex()
  12. {
  13. // Asserts to make sure that we aren't using any skipped combinations.
  14. // Asserts to make sure that we are setting all of the combination vars.
  15. #ifdef _DEBUG
  16. #endif // _DEBUG
  17. return 0;
  18. }
  19. };
  20. #define shaderStaticTest_debugdrawdepth_vs20 0
  21. class debugdrawdepth_vs20_Dynamic_Index
  22. {
  23. private:
  24. int m_nCOMPRESSED_VERTS;
  25. #ifdef _DEBUG
  26. bool m_bCOMPRESSED_VERTS;
  27. #endif
  28. public:
  29. void SetCOMPRESSED_VERTS( int i )
  30. {
  31. Assert( i >= 0 && i <= 1 );
  32. m_nCOMPRESSED_VERTS = i;
  33. #ifdef _DEBUG
  34. m_bCOMPRESSED_VERTS = true;
  35. #endif
  36. }
  37. void SetCOMPRESSED_VERTS( bool i )
  38. {
  39. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  40. m_nCOMPRESSED_VERTS = i ? 1 : 0;
  41. #ifdef _DEBUG
  42. m_bCOMPRESSED_VERTS = true;
  43. #endif
  44. }
  45. private:
  46. int m_nSKINNING;
  47. #ifdef _DEBUG
  48. bool m_bSKINNING;
  49. #endif
  50. public:
  51. void SetSKINNING( int i )
  52. {
  53. Assert( i >= 0 && i <= 1 );
  54. m_nSKINNING = i;
  55. #ifdef _DEBUG
  56. m_bSKINNING = true;
  57. #endif
  58. }
  59. void SetSKINNING( bool i )
  60. {
  61. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  62. m_nSKINNING = i ? 1 : 0;
  63. #ifdef _DEBUG
  64. m_bSKINNING = true;
  65. #endif
  66. }
  67. public:
  68. // CONSTRUCTOR
  69. debugdrawdepth_vs20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  70. {
  71. #ifdef _DEBUG
  72. m_bCOMPRESSED_VERTS = false;
  73. #endif // _DEBUG
  74. m_nCOMPRESSED_VERTS = 0;
  75. #ifdef _DEBUG
  76. m_bSKINNING = false;
  77. #endif // _DEBUG
  78. m_nSKINNING = 0;
  79. }
  80. int GetIndex()
  81. {
  82. // Asserts to make sure that we aren't using any skipped combinations.
  83. // Asserts to make sure that we are setting all of the combination vars.
  84. #ifdef _DEBUG
  85. bool bAllDynamicVarsDefined = m_bCOMPRESSED_VERTS && m_bSKINNING;
  86. Assert( bAllDynamicVarsDefined );
  87. #endif // _DEBUG
  88. return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nSKINNING ) + 0;
  89. }
  90. };
  91. #define shaderDynamicTest_debugdrawdepth_vs20 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_SKINNING + 0
  92. static const ShaderComboInformation_t s_DynamicComboArray_DebugDrawDepth_vs20[2] =
  93. {
  94. { "COMPRESSED_VERTS", 0, 1 },
  95. { "SKINNING", 0, 1 },
  96. };
  97. static const ShaderComboSemantics_t DebugDrawDepth_vs20_combos =
  98. {
  99. "DebugDrawDepth_vs20", s_DynamicComboArray_DebugDrawDepth_vs20, 2, NULL, 0
  100. };
  101. class ConstructMe_DebugDrawDepth_vs20
  102. {
  103. public:
  104. ConstructMe_DebugDrawDepth_vs20()
  105. {
  106. GetShaderDLL()->AddShaderComboInformation( &DebugDrawDepth_vs20_combos );
  107. }
  108. };
  109. static ConstructMe_DebugDrawDepth_vs20 s_ConstructMe_DebugDrawDepth_vs20;