Team Fortress 2 Source Code as on 22/4/2020
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.

212 lines
4.1 KiB

  1. #include "shaderlib/cshader.h"
  2. class teeth_vs30_Static_Index
  3. {
  4. private:
  5. int m_nINTRO;
  6. #ifdef _DEBUG
  7. bool m_bINTRO;
  8. #endif
  9. public:
  10. void SetINTRO( int i )
  11. {
  12. Assert( i >= 0 && i <= 1 );
  13. m_nINTRO = i;
  14. #ifdef _DEBUG
  15. m_bINTRO = true;
  16. #endif
  17. }
  18. void SetINTRO( bool i )
  19. {
  20. m_nINTRO = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bINTRO = true;
  23. #endif
  24. }
  25. public:
  26. teeth_vs30_Static_Index( )
  27. {
  28. #ifdef _DEBUG
  29. m_bINTRO = false;
  30. #endif // _DEBUG
  31. m_nINTRO = 0;
  32. }
  33. int GetIndex()
  34. {
  35. // Asserts to make sure that we aren't using any skipped combinations.
  36. // Asserts to make sure that we are setting all of the combination vars.
  37. #ifdef _DEBUG
  38. bool bAllStaticVarsDefined = m_bINTRO;
  39. Assert( bAllStaticVarsDefined );
  40. #endif // _DEBUG
  41. return ( 64 * m_nINTRO ) + 0;
  42. }
  43. };
  44. #define shaderStaticTest_teeth_vs30 vsh_forgot_to_set_static_INTRO + 0
  45. class teeth_vs30_Dynamic_Index
  46. {
  47. private:
  48. int m_nCOMPRESSED_VERTS;
  49. #ifdef _DEBUG
  50. bool m_bCOMPRESSED_VERTS;
  51. #endif
  52. public:
  53. void SetCOMPRESSED_VERTS( int i )
  54. {
  55. Assert( i >= 0 && i <= 1 );
  56. m_nCOMPRESSED_VERTS = i;
  57. #ifdef _DEBUG
  58. m_bCOMPRESSED_VERTS = true;
  59. #endif
  60. }
  61. void SetCOMPRESSED_VERTS( bool i )
  62. {
  63. m_nCOMPRESSED_VERTS = i ? 1 : 0;
  64. #ifdef _DEBUG
  65. m_bCOMPRESSED_VERTS = true;
  66. #endif
  67. }
  68. private:
  69. int m_nDOWATERFOG;
  70. #ifdef _DEBUG
  71. bool m_bDOWATERFOG;
  72. #endif
  73. public:
  74. void SetDOWATERFOG( int i )
  75. {
  76. Assert( i >= 0 && i <= 1 );
  77. m_nDOWATERFOG = i;
  78. #ifdef _DEBUG
  79. m_bDOWATERFOG = true;
  80. #endif
  81. }
  82. void SetDOWATERFOG( bool i )
  83. {
  84. m_nDOWATERFOG = i ? 1 : 0;
  85. #ifdef _DEBUG
  86. m_bDOWATERFOG = true;
  87. #endif
  88. }
  89. private:
  90. int m_nSKINNING;
  91. #ifdef _DEBUG
  92. bool m_bSKINNING;
  93. #endif
  94. public:
  95. void SetSKINNING( int i )
  96. {
  97. Assert( i >= 0 && i <= 1 );
  98. m_nSKINNING = i;
  99. #ifdef _DEBUG
  100. m_bSKINNING = true;
  101. #endif
  102. }
  103. void SetSKINNING( bool i )
  104. {
  105. m_nSKINNING = i ? 1 : 0;
  106. #ifdef _DEBUG
  107. m_bSKINNING = true;
  108. #endif
  109. }
  110. private:
  111. int m_nDYNAMIC_LIGHT;
  112. #ifdef _DEBUG
  113. bool m_bDYNAMIC_LIGHT;
  114. #endif
  115. public:
  116. void SetDYNAMIC_LIGHT( int i )
  117. {
  118. Assert( i >= 0 && i <= 1 );
  119. m_nDYNAMIC_LIGHT = i;
  120. #ifdef _DEBUG
  121. m_bDYNAMIC_LIGHT = true;
  122. #endif
  123. }
  124. void SetDYNAMIC_LIGHT( bool i )
  125. {
  126. m_nDYNAMIC_LIGHT = i ? 1 : 0;
  127. #ifdef _DEBUG
  128. m_bDYNAMIC_LIGHT = true;
  129. #endif
  130. }
  131. private:
  132. int m_nSTATIC_LIGHT;
  133. #ifdef _DEBUG
  134. bool m_bSTATIC_LIGHT;
  135. #endif
  136. public:
  137. void SetSTATIC_LIGHT( int i )
  138. {
  139. Assert( i >= 0 && i <= 1 );
  140. m_nSTATIC_LIGHT = i;
  141. #ifdef _DEBUG
  142. m_bSTATIC_LIGHT = true;
  143. #endif
  144. }
  145. void SetSTATIC_LIGHT( bool i )
  146. {
  147. m_nSTATIC_LIGHT = i ? 1 : 0;
  148. #ifdef _DEBUG
  149. m_bSTATIC_LIGHT = true;
  150. #endif
  151. }
  152. private:
  153. int m_nMORPHING;
  154. #ifdef _DEBUG
  155. bool m_bMORPHING;
  156. #endif
  157. public:
  158. void SetMORPHING( int i )
  159. {
  160. Assert( i >= 0 && i <= 1 );
  161. m_nMORPHING = i;
  162. #ifdef _DEBUG
  163. m_bMORPHING = true;
  164. #endif
  165. }
  166. void SetMORPHING( bool i )
  167. {
  168. m_nMORPHING = i ? 1 : 0;
  169. #ifdef _DEBUG
  170. m_bMORPHING = true;
  171. #endif
  172. }
  173. public:
  174. teeth_vs30_Dynamic_Index()
  175. {
  176. #ifdef _DEBUG
  177. m_bCOMPRESSED_VERTS = false;
  178. #endif // _DEBUG
  179. m_nCOMPRESSED_VERTS = 0;
  180. #ifdef _DEBUG
  181. m_bDOWATERFOG = false;
  182. #endif // _DEBUG
  183. m_nDOWATERFOG = 0;
  184. #ifdef _DEBUG
  185. m_bSKINNING = false;
  186. #endif // _DEBUG
  187. m_nSKINNING = 0;
  188. #ifdef _DEBUG
  189. m_bDYNAMIC_LIGHT = false;
  190. #endif // _DEBUG
  191. m_nDYNAMIC_LIGHT = 0;
  192. #ifdef _DEBUG
  193. m_bSTATIC_LIGHT = false;
  194. #endif // _DEBUG
  195. m_nSTATIC_LIGHT = 0;
  196. #ifdef _DEBUG
  197. m_bMORPHING = false;
  198. #endif // _DEBUG
  199. m_nMORPHING = 0;
  200. }
  201. int GetIndex()
  202. {
  203. // Asserts to make sure that we aren't using any skipped combinations.
  204. // Asserts to make sure that we are setting all of the combination vars.
  205. #ifdef _DEBUG
  206. bool bAllDynamicVarsDefined = m_bCOMPRESSED_VERTS && m_bDOWATERFOG && m_bSKINNING && m_bDYNAMIC_LIGHT && m_bSTATIC_LIGHT && m_bMORPHING;
  207. Assert( bAllDynamicVarsDefined );
  208. #endif // _DEBUG
  209. return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nDOWATERFOG ) + ( 4 * m_nSKINNING ) + ( 8 * m_nDYNAMIC_LIGHT ) + ( 16 * m_nSTATIC_LIGHT ) + ( 32 * m_nMORPHING ) + 0;
  210. }
  211. };
  212. #define shaderDynamicTest_teeth_vs30 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_DYNAMIC_LIGHT + vsh_forgot_to_set_dynamic_STATIC_LIGHT + vsh_forgot_to_set_dynamic_MORPHING + 0