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.

117 lines
2.6 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. #include "shaderlib/cshader.h"
  3. class depthwrite_ps20b_Static_Index
  4. {
  5. private:
  6. int m_nCOLOR_DEPTH;
  7. #ifdef _DEBUG
  8. bool m_bCOLOR_DEPTH;
  9. #endif
  10. public:
  11. void SetCOLOR_DEPTH( int i )
  12. {
  13. Assert( i >= 0 && i <= 1 );
  14. m_nCOLOR_DEPTH = i;
  15. #ifdef _DEBUG
  16. m_bCOLOR_DEPTH = true;
  17. #endif
  18. }
  19. void SetCOLOR_DEPTH( bool i )
  20. {
  21. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  22. m_nCOLOR_DEPTH = i ? 1 : 0;
  23. #ifdef _DEBUG
  24. m_bCOLOR_DEPTH = true;
  25. #endif
  26. }
  27. public:
  28. // CONSTRUCTOR
  29. depthwrite_ps20b_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  30. {
  31. #ifdef _DEBUG
  32. m_bCOLOR_DEPTH = false;
  33. #endif // _DEBUG
  34. m_nCOLOR_DEPTH = 0;
  35. }
  36. int GetIndex()
  37. {
  38. // Asserts to make sure that we aren't using any skipped combinations.
  39. // Asserts to make sure that we are setting all of the combination vars.
  40. #ifdef _DEBUG
  41. bool bAllStaticVarsDefined = m_bCOLOR_DEPTH;
  42. Assert( bAllStaticVarsDefined );
  43. #endif // _DEBUG
  44. return ( 2 * m_nCOLOR_DEPTH ) + 0;
  45. }
  46. };
  47. #define shaderStaticTest_depthwrite_ps20b psh_forgot_to_set_static_COLOR_DEPTH + 0
  48. class depthwrite_ps20b_Dynamic_Index
  49. {
  50. private:
  51. int m_nALPHACLIP;
  52. #ifdef _DEBUG
  53. bool m_bALPHACLIP;
  54. #endif
  55. public:
  56. void SetALPHACLIP( int i )
  57. {
  58. Assert( i >= 0 && i <= 1 );
  59. m_nALPHACLIP = i;
  60. #ifdef _DEBUG
  61. m_bALPHACLIP = true;
  62. #endif
  63. }
  64. void SetALPHACLIP( bool i )
  65. {
  66. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  67. m_nALPHACLIP = i ? 1 : 0;
  68. #ifdef _DEBUG
  69. m_bALPHACLIP = true;
  70. #endif
  71. }
  72. public:
  73. // CONSTRUCTOR
  74. depthwrite_ps20b_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  75. {
  76. #ifdef _DEBUG
  77. m_bALPHACLIP = false;
  78. #endif // _DEBUG
  79. m_nALPHACLIP = 0;
  80. }
  81. int GetIndex()
  82. {
  83. // Asserts to make sure that we aren't using any skipped combinations.
  84. // Asserts to make sure that we are setting all of the combination vars.
  85. #ifdef _DEBUG
  86. bool bAllDynamicVarsDefined = m_bALPHACLIP;
  87. Assert( bAllDynamicVarsDefined );
  88. #endif // _DEBUG
  89. return ( 1 * m_nALPHACLIP ) + 0;
  90. }
  91. };
  92. #define shaderDynamicTest_depthwrite_ps20b psh_forgot_to_set_dynamic_ALPHACLIP + 0
  93. static const ShaderComboInformation_t s_DynamicComboArray_depthwrite_ps20b[1] =
  94. {
  95. { "ALPHACLIP", 0, 1 },
  96. };
  97. static const ShaderComboInformation_t s_StaticComboArray_depthwrite_ps20b[1] =
  98. {
  99. { "COLOR_DEPTH", 0, 1 },
  100. };
  101. static const ShaderComboSemantics_t depthwrite_ps20b_combos =
  102. {
  103. "depthwrite_ps20b", s_DynamicComboArray_depthwrite_ps20b, 1, s_StaticComboArray_depthwrite_ps20b, 1
  104. };
  105. class ConstructMe_depthwrite_ps20b
  106. {
  107. public:
  108. ConstructMe_depthwrite_ps20b()
  109. {
  110. GetShaderDLL()->AddShaderComboInformation( &depthwrite_ps20b_combos );
  111. }
  112. };
  113. static ConstructMe_depthwrite_ps20b s_ConstructMe_depthwrite_ps20b;