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.

173 lines
3.7 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. private:
  30. int m_nHARDWAREFOGBLEND;
  31. #ifdef _DEBUG
  32. bool m_bHARDWAREFOGBLEND;
  33. #endif
  34. public:
  35. void SetHARDWAREFOGBLEND( int i )
  36. {
  37. Assert( i >= 0 && i <= 0 );
  38. m_nHARDWAREFOGBLEND = i;
  39. #ifdef _DEBUG
  40. m_bHARDWAREFOGBLEND = true;
  41. #endif
  42. }
  43. void SetHARDWAREFOGBLEND( bool i )
  44. {
  45. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  46. m_nHARDWAREFOGBLEND = i ? 1 : 0;
  47. #ifdef _DEBUG
  48. m_bHARDWAREFOGBLEND = true;
  49. #endif
  50. }
  51. public:
  52. // CONSTRUCTOR
  53. black_vs20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  54. {
  55. #ifdef _DEBUG
  56. m_bDOPIXELFOG = true;
  57. #endif // _DEBUG
  58. m_nDOPIXELFOG = 0; ;
  59. #ifdef _DEBUG
  60. m_bHARDWAREFOGBLEND = true;
  61. #endif // _DEBUG
  62. m_nHARDWAREFOGBLEND = 0 ;
  63. }
  64. int GetIndex()
  65. {
  66. // Asserts to make sure that we aren't using any skipped combinations.
  67. // Asserts to make sure that we are setting all of the combination vars.
  68. #ifdef _DEBUG
  69. bool bAllStaticVarsDefined = m_bDOPIXELFOG && m_bHARDWAREFOGBLEND;
  70. Assert( bAllStaticVarsDefined );
  71. #endif // _DEBUG
  72. return ( 2 * m_nDOPIXELFOG ) + ( 2 * m_nHARDWAREFOGBLEND ) + 0;
  73. }
  74. };
  75. #define shaderStaticTest_black_vs20 0
  76. class black_vs20_Dynamic_Index
  77. {
  78. private:
  79. int m_nDOWATERFOG;
  80. #ifdef _DEBUG
  81. bool m_bDOWATERFOG;
  82. #endif
  83. public:
  84. void SetDOWATERFOG( int i )
  85. {
  86. Assert( i >= 0 && i <= 0 );
  87. m_nDOWATERFOG = i;
  88. #ifdef _DEBUG
  89. m_bDOWATERFOG = true;
  90. #endif
  91. }
  92. void SetDOWATERFOG( bool i )
  93. {
  94. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  95. m_nDOWATERFOG = i ? 1 : 0;
  96. #ifdef _DEBUG
  97. m_bDOWATERFOG = true;
  98. #endif
  99. }
  100. private:
  101. int m_nSKINNING;
  102. #ifdef _DEBUG
  103. bool m_bSKINNING;
  104. #endif
  105. public:
  106. void SetSKINNING( int i )
  107. {
  108. Assert( i >= 0 && i <= 1 );
  109. m_nSKINNING = i;
  110. #ifdef _DEBUG
  111. m_bSKINNING = true;
  112. #endif
  113. }
  114. void SetSKINNING( bool i )
  115. {
  116. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  117. m_nSKINNING = i ? 1 : 0;
  118. #ifdef _DEBUG
  119. m_bSKINNING = true;
  120. #endif
  121. }
  122. public:
  123. // CONSTRUCTOR
  124. black_vs20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  125. {
  126. #ifdef _DEBUG
  127. m_bDOWATERFOG = true;
  128. #endif // _DEBUG
  129. m_nDOWATERFOG = 0; ;
  130. #ifdef _DEBUG
  131. m_bSKINNING = false;
  132. #endif // _DEBUG
  133. m_nSKINNING = 0;
  134. }
  135. int GetIndex()
  136. {
  137. // Asserts to make sure that we aren't using any skipped combinations.
  138. // Asserts to make sure that we are setting all of the combination vars.
  139. #ifdef _DEBUG
  140. bool bAllDynamicVarsDefined = m_bDOWATERFOG && m_bSKINNING;
  141. Assert( bAllDynamicVarsDefined );
  142. #endif // _DEBUG
  143. return ( 1 * m_nDOWATERFOG ) + ( 1 * m_nSKINNING ) + 0;
  144. }
  145. };
  146. #define shaderDynamicTest_black_vs20 vsh_forgot_to_set_dynamic_SKINNING + 0
  147. static const ShaderComboInformation_t s_DynamicComboArray_black_vs20[2] =
  148. {
  149. { "DOWATERFOG", 0, 0 },
  150. { "SKINNING", 0, 1 },
  151. };
  152. static const ShaderComboInformation_t s_StaticComboArray_black_vs20[2] =
  153. {
  154. { "DOPIXELFOG", 0, 0 },
  155. { "HARDWAREFOGBLEND", 0, 0 },
  156. };
  157. static const ShaderComboSemantics_t black_vs20_combos =
  158. {
  159. "black_vs20", s_DynamicComboArray_black_vs20, 2, s_StaticComboArray_black_vs20, 2
  160. };
  161. class ConstructMe_black_vs20
  162. {
  163. public:
  164. ConstructMe_black_vs20()
  165. {
  166. GetShaderDLL()->AddShaderComboInformation( &black_vs20_combos );
  167. }
  168. };
  169. static ConstructMe_black_vs20 s_ConstructMe_black_vs20;