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.

187 lines
3.6 KiB

  1. #include "shaderlib/cshader.h"
  2. class eyes_cloak_vs20b_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. private:
  26. int m_nHALFLAMBERT;
  27. #ifdef _DEBUG
  28. bool m_bHALFLAMBERT;
  29. #endif
  30. public:
  31. void SetHALFLAMBERT( int i )
  32. {
  33. Assert( i >= 0 && i <= 1 );
  34. m_nHALFLAMBERT = i;
  35. #ifdef _DEBUG
  36. m_bHALFLAMBERT = true;
  37. #endif
  38. }
  39. void SetHALFLAMBERT( bool i )
  40. {
  41. m_nHALFLAMBERT = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bHALFLAMBERT = true;
  44. #endif
  45. }
  46. public:
  47. eyes_cloak_vs20b_Static_Index( )
  48. {
  49. #ifdef _DEBUG
  50. m_bINTRO = false;
  51. #endif // _DEBUG
  52. m_nINTRO = 0;
  53. #ifdef _DEBUG
  54. m_bHALFLAMBERT = false;
  55. #endif // _DEBUG
  56. m_nHALFLAMBERT = 0;
  57. }
  58. int GetIndex()
  59. {
  60. // Asserts to make sure that we aren't using any skipped combinations.
  61. // Asserts to make sure that we are setting all of the combination vars.
  62. #ifdef _DEBUG
  63. bool bAllStaticVarsDefined = m_bINTRO && m_bHALFLAMBERT;
  64. Assert( bAllStaticVarsDefined );
  65. #endif // _DEBUG
  66. return ( 32 * m_nINTRO ) + ( 64 * m_nHALFLAMBERT ) + 0;
  67. }
  68. };
  69. #define shaderStaticTest_eyes_cloak_vs20b vsh_forgot_to_set_static_INTRO + vsh_forgot_to_set_static_HALFLAMBERT + 0
  70. class eyes_cloak_vs20b_Dynamic_Index
  71. {
  72. private:
  73. int m_nNUM_BONES;
  74. #ifdef _DEBUG
  75. bool m_bNUM_BONES;
  76. #endif
  77. public:
  78. void SetNUM_BONES( int i )
  79. {
  80. Assert( i >= 0 && i <= 3 );
  81. m_nNUM_BONES = i;
  82. #ifdef _DEBUG
  83. m_bNUM_BONES = true;
  84. #endif
  85. }
  86. void SetNUM_BONES( bool i )
  87. {
  88. m_nNUM_BONES = i ? 1 : 0;
  89. #ifdef _DEBUG
  90. m_bNUM_BONES = true;
  91. #endif
  92. }
  93. private:
  94. int m_nDOWATERFOG;
  95. #ifdef _DEBUG
  96. bool m_bDOWATERFOG;
  97. #endif
  98. public:
  99. void SetDOWATERFOG( int i )
  100. {
  101. Assert( i >= 0 && i <= 1 );
  102. m_nDOWATERFOG = i;
  103. #ifdef _DEBUG
  104. m_bDOWATERFOG = true;
  105. #endif
  106. }
  107. void SetDOWATERFOG( bool i )
  108. {
  109. m_nDOWATERFOG = i ? 1 : 0;
  110. #ifdef _DEBUG
  111. m_bDOWATERFOG = true;
  112. #endif
  113. }
  114. private:
  115. int m_nDYNAMIC_LIGHT;
  116. #ifdef _DEBUG
  117. bool m_bDYNAMIC_LIGHT;
  118. #endif
  119. public:
  120. void SetDYNAMIC_LIGHT( int i )
  121. {
  122. Assert( i >= 0 && i <= 1 );
  123. m_nDYNAMIC_LIGHT = i;
  124. #ifdef _DEBUG
  125. m_bDYNAMIC_LIGHT = true;
  126. #endif
  127. }
  128. void SetDYNAMIC_LIGHT( bool i )
  129. {
  130. m_nDYNAMIC_LIGHT = i ? 1 : 0;
  131. #ifdef _DEBUG
  132. m_bDYNAMIC_LIGHT = true;
  133. #endif
  134. }
  135. private:
  136. int m_nSTATIC_LIGHT;
  137. #ifdef _DEBUG
  138. bool m_bSTATIC_LIGHT;
  139. #endif
  140. public:
  141. void SetSTATIC_LIGHT( int i )
  142. {
  143. Assert( i >= 0 && i <= 1 );
  144. m_nSTATIC_LIGHT = i;
  145. #ifdef _DEBUG
  146. m_bSTATIC_LIGHT = true;
  147. #endif
  148. }
  149. void SetSTATIC_LIGHT( bool i )
  150. {
  151. m_nSTATIC_LIGHT = i ? 1 : 0;
  152. #ifdef _DEBUG
  153. m_bSTATIC_LIGHT = true;
  154. #endif
  155. }
  156. public:
  157. eyes_cloak_vs20b_Dynamic_Index()
  158. {
  159. #ifdef _DEBUG
  160. m_bNUM_BONES = false;
  161. #endif // _DEBUG
  162. m_nNUM_BONES = 0;
  163. #ifdef _DEBUG
  164. m_bDOWATERFOG = false;
  165. #endif // _DEBUG
  166. m_nDOWATERFOG = 0;
  167. #ifdef _DEBUG
  168. m_bDYNAMIC_LIGHT = false;
  169. #endif // _DEBUG
  170. m_nDYNAMIC_LIGHT = 0;
  171. #ifdef _DEBUG
  172. m_bSTATIC_LIGHT = false;
  173. #endif // _DEBUG
  174. m_nSTATIC_LIGHT = 0;
  175. }
  176. int GetIndex()
  177. {
  178. // Asserts to make sure that we aren't using any skipped combinations.
  179. // Asserts to make sure that we are setting all of the combination vars.
  180. #ifdef _DEBUG
  181. bool bAllDynamicVarsDefined = m_bNUM_BONES && m_bDOWATERFOG && m_bDYNAMIC_LIGHT && m_bSTATIC_LIGHT;
  182. Assert( bAllDynamicVarsDefined );
  183. #endif // _DEBUG
  184. return ( 1 * m_nNUM_BONES ) + ( 4 * m_nDOWATERFOG ) + ( 8 * m_nDYNAMIC_LIGHT ) + ( 16 * m_nSTATIC_LIGHT ) + 0;
  185. }
  186. };
  187. #define shaderDynamicTest_eyes_cloak_vs20b vsh_forgot_to_set_dynamic_NUM_BONES + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_DYNAMIC_LIGHT + vsh_forgot_to_set_dynamic_STATIC_LIGHT + 0