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.

146 lines
3.1 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. // ( $DOWATERFOG == 0 ) && ( $DOPIXELFOG && $HARDWAREFOGBLEND )
  3. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  4. #include "shaderlib/cshader.h"
  5. class black_vs20_Static_Index
  6. {
  7. private:
  8. int m_nDOPIXELFOG;
  9. #ifdef _DEBUG
  10. bool m_bDOPIXELFOG;
  11. #endif
  12. public:
  13. void SetDOPIXELFOG( int i )
  14. {
  15. Assert( i >= 0 && i <= 0 );
  16. m_nDOPIXELFOG = i;
  17. #ifdef _DEBUG
  18. m_bDOPIXELFOG = true;
  19. #endif
  20. }
  21. void SetDOPIXELFOG( bool i )
  22. {
  23. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  24. m_nDOPIXELFOG = i ? 1 : 0;
  25. #ifdef _DEBUG
  26. m_bDOPIXELFOG = true;
  27. #endif
  28. }
  29. public:
  30. // CONSTRUCTOR
  31. black_vs20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  32. {
  33. #ifdef _DEBUG
  34. m_bDOPIXELFOG = true;
  35. #endif // _DEBUG
  36. m_nDOPIXELFOG = 0; ;
  37. }
  38. int GetIndex()
  39. {
  40. // Asserts to make sure that we aren't using any skipped combinations.
  41. // Asserts to make sure that we are setting all of the combination vars.
  42. #ifdef _DEBUG
  43. bool bAllStaticVarsDefined = m_bDOPIXELFOG;
  44. Assert( bAllStaticVarsDefined );
  45. #endif // _DEBUG
  46. return ( 2 * m_nDOPIXELFOG ) + 0;
  47. }
  48. };
  49. #define shaderStaticTest_black_vs20 0
  50. class black_vs20_Dynamic_Index
  51. {
  52. private:
  53. int m_nDOWATERFOG;
  54. #ifdef _DEBUG
  55. bool m_bDOWATERFOG;
  56. #endif
  57. public:
  58. void SetDOWATERFOG( int i )
  59. {
  60. Assert( i >= 0 && i <= 0 );
  61. m_nDOWATERFOG = i;
  62. #ifdef _DEBUG
  63. m_bDOWATERFOG = true;
  64. #endif
  65. }
  66. void SetDOWATERFOG( bool i )
  67. {
  68. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  69. m_nDOWATERFOG = i ? 1 : 0;
  70. #ifdef _DEBUG
  71. m_bDOWATERFOG = true;
  72. #endif
  73. }
  74. private:
  75. int m_nSKINNING;
  76. #ifdef _DEBUG
  77. bool m_bSKINNING;
  78. #endif
  79. public:
  80. void SetSKINNING( int i )
  81. {
  82. Assert( i >= 0 && i <= 1 );
  83. m_nSKINNING = i;
  84. #ifdef _DEBUG
  85. m_bSKINNING = true;
  86. #endif
  87. }
  88. void SetSKINNING( bool i )
  89. {
  90. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  91. m_nSKINNING = i ? 1 : 0;
  92. #ifdef _DEBUG
  93. m_bSKINNING = true;
  94. #endif
  95. }
  96. public:
  97. // CONSTRUCTOR
  98. black_vs20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  99. {
  100. #ifdef _DEBUG
  101. m_bDOWATERFOG = true;
  102. #endif // _DEBUG
  103. m_nDOWATERFOG = 0; ;
  104. #ifdef _DEBUG
  105. m_bSKINNING = false;
  106. #endif // _DEBUG
  107. m_nSKINNING = 0;
  108. }
  109. int GetIndex()
  110. {
  111. // Asserts to make sure that we aren't using any skipped combinations.
  112. // Asserts to make sure that we are setting all of the combination vars.
  113. #ifdef _DEBUG
  114. bool bAllDynamicVarsDefined = m_bDOWATERFOG && m_bSKINNING;
  115. Assert( bAllDynamicVarsDefined );
  116. #endif // _DEBUG
  117. return ( 1 * m_nDOWATERFOG ) + ( 1 * m_nSKINNING ) + 0;
  118. }
  119. };
  120. #define shaderDynamicTest_black_vs20 vsh_forgot_to_set_dynamic_SKINNING + 0
  121. static const ShaderComboInformation_t s_DynamicComboArray_black_vs20[2] =
  122. {
  123. { "DOWATERFOG", 0, 0 },
  124. { "SKINNING", 0, 1 },
  125. };
  126. static const ShaderComboInformation_t s_StaticComboArray_black_vs20[1] =
  127. {
  128. { "DOPIXELFOG", 0, 0 },
  129. };
  130. static const ShaderComboSemantics_t black_vs20_combos =
  131. {
  132. "black_vs20", s_DynamicComboArray_black_vs20, 2, s_StaticComboArray_black_vs20, 1
  133. };
  134. class ConstructMe_black_vs20
  135. {
  136. public:
  137. ConstructMe_black_vs20()
  138. {
  139. GetShaderDLL()->AddShaderComboInformation( &black_vs20_combos );
  140. }
  141. };
  142. static ConstructMe_black_vs20 s_ConstructMe_black_vs20;