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.

262 lines
5.6 KiB

  1. #include "shaderlib/cshader.h"
  2. class flashlight_ps20b_Static_Index
  3. {
  4. private:
  5. int m_nNORMALMAP;
  6. #ifdef _DEBUG
  7. bool m_bNORMALMAP;
  8. #endif
  9. public:
  10. void SetNORMALMAP( int i )
  11. {
  12. Assert( i >= 0 && i <= 2 );
  13. m_nNORMALMAP = i;
  14. #ifdef _DEBUG
  15. m_bNORMALMAP = true;
  16. #endif
  17. }
  18. void SetNORMALMAP( bool i )
  19. {
  20. m_nNORMALMAP = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bNORMALMAP = true;
  23. #endif
  24. }
  25. private:
  26. int m_nNORMALMAP2;
  27. #ifdef _DEBUG
  28. bool m_bNORMALMAP2;
  29. #endif
  30. public:
  31. void SetNORMALMAP2( int i )
  32. {
  33. Assert( i >= 0 && i <= 1 );
  34. m_nNORMALMAP2 = i;
  35. #ifdef _DEBUG
  36. m_bNORMALMAP2 = true;
  37. #endif
  38. }
  39. void SetNORMALMAP2( bool i )
  40. {
  41. m_nNORMALMAP2 = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bNORMALMAP2 = true;
  44. #endif
  45. }
  46. private:
  47. int m_nWORLDVERTEXTRANSITION;
  48. #ifdef _DEBUG
  49. bool m_bWORLDVERTEXTRANSITION;
  50. #endif
  51. public:
  52. void SetWORLDVERTEXTRANSITION( int i )
  53. {
  54. Assert( i >= 0 && i <= 1 );
  55. m_nWORLDVERTEXTRANSITION = i;
  56. #ifdef _DEBUG
  57. m_bWORLDVERTEXTRANSITION = true;
  58. #endif
  59. }
  60. void SetWORLDVERTEXTRANSITION( bool i )
  61. {
  62. m_nWORLDVERTEXTRANSITION = i ? 1 : 0;
  63. #ifdef _DEBUG
  64. m_bWORLDVERTEXTRANSITION = true;
  65. #endif
  66. }
  67. private:
  68. int m_nSEAMLESS;
  69. #ifdef _DEBUG
  70. bool m_bSEAMLESS;
  71. #endif
  72. public:
  73. void SetSEAMLESS( int i )
  74. {
  75. Assert( i >= 0 && i <= 1 );
  76. m_nSEAMLESS = i;
  77. #ifdef _DEBUG
  78. m_bSEAMLESS = true;
  79. #endif
  80. }
  81. void SetSEAMLESS( bool i )
  82. {
  83. m_nSEAMLESS = i ? 1 : 0;
  84. #ifdef _DEBUG
  85. m_bSEAMLESS = true;
  86. #endif
  87. }
  88. private:
  89. int m_nDETAILTEXTURE;
  90. #ifdef _DEBUG
  91. bool m_bDETAILTEXTURE;
  92. #endif
  93. public:
  94. void SetDETAILTEXTURE( int i )
  95. {
  96. Assert( i >= 0 && i <= 1 );
  97. m_nDETAILTEXTURE = i;
  98. #ifdef _DEBUG
  99. m_bDETAILTEXTURE = true;
  100. #endif
  101. }
  102. void SetDETAILTEXTURE( bool i )
  103. {
  104. m_nDETAILTEXTURE = i ? 1 : 0;
  105. #ifdef _DEBUG
  106. m_bDETAILTEXTURE = true;
  107. #endif
  108. }
  109. private:
  110. int m_nDETAIL_BLEND_MODE;
  111. #ifdef _DEBUG
  112. bool m_bDETAIL_BLEND_MODE;
  113. #endif
  114. public:
  115. void SetDETAIL_BLEND_MODE( int i )
  116. {
  117. Assert( i >= 0 && i <= 1 );
  118. m_nDETAIL_BLEND_MODE = i;
  119. #ifdef _DEBUG
  120. m_bDETAIL_BLEND_MODE = true;
  121. #endif
  122. }
  123. void SetDETAIL_BLEND_MODE( bool i )
  124. {
  125. m_nDETAIL_BLEND_MODE = i ? 1 : 0;
  126. #ifdef _DEBUG
  127. m_bDETAIL_BLEND_MODE = true;
  128. #endif
  129. }
  130. private:
  131. int m_nFLASHLIGHTDEPTHFILTERMODE;
  132. #ifdef _DEBUG
  133. bool m_bFLASHLIGHTDEPTHFILTERMODE;
  134. #endif
  135. public:
  136. void SetFLASHLIGHTDEPTHFILTERMODE( int i )
  137. {
  138. Assert( i >= 0 && i <= 2 );
  139. m_nFLASHLIGHTDEPTHFILTERMODE = i;
  140. #ifdef _DEBUG
  141. m_bFLASHLIGHTDEPTHFILTERMODE = true;
  142. #endif
  143. }
  144. void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
  145. {
  146. m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
  147. #ifdef _DEBUG
  148. m_bFLASHLIGHTDEPTHFILTERMODE = true;
  149. #endif
  150. }
  151. public:
  152. flashlight_ps20b_Static_Index( )
  153. {
  154. #ifdef _DEBUG
  155. m_bNORMALMAP = false;
  156. #endif // _DEBUG
  157. m_nNORMALMAP = 0;
  158. #ifdef _DEBUG
  159. m_bNORMALMAP2 = false;
  160. #endif // _DEBUG
  161. m_nNORMALMAP2 = 0;
  162. #ifdef _DEBUG
  163. m_bWORLDVERTEXTRANSITION = false;
  164. #endif // _DEBUG
  165. m_nWORLDVERTEXTRANSITION = 0;
  166. #ifdef _DEBUG
  167. m_bSEAMLESS = false;
  168. #endif // _DEBUG
  169. m_nSEAMLESS = 0;
  170. #ifdef _DEBUG
  171. m_bDETAILTEXTURE = false;
  172. #endif // _DEBUG
  173. m_nDETAILTEXTURE = 0;
  174. #ifdef _DEBUG
  175. m_bDETAIL_BLEND_MODE = false;
  176. #endif // _DEBUG
  177. m_nDETAIL_BLEND_MODE = 0;
  178. #ifdef _DEBUG
  179. m_bFLASHLIGHTDEPTHFILTERMODE = false;
  180. #endif // _DEBUG
  181. m_nFLASHLIGHTDEPTHFILTERMODE = 0;
  182. }
  183. int GetIndex()
  184. {
  185. // Asserts to make sure that we aren't using any skipped combinations.
  186. // Asserts to make sure that we are setting all of the combination vars.
  187. #ifdef _DEBUG
  188. bool bAllStaticVarsDefined = m_bNORMALMAP && m_bNORMALMAP2 && m_bWORLDVERTEXTRANSITION && m_bSEAMLESS && m_bDETAILTEXTURE && m_bDETAIL_BLEND_MODE && m_bFLASHLIGHTDEPTHFILTERMODE;
  189. Assert( bAllStaticVarsDefined );
  190. #endif // _DEBUG
  191. return ( 4 * m_nNORMALMAP ) + ( 12 * m_nNORMALMAP2 ) + ( 24 * m_nWORLDVERTEXTRANSITION ) + ( 48 * m_nSEAMLESS ) + ( 96 * m_nDETAILTEXTURE ) + ( 192 * m_nDETAIL_BLEND_MODE ) + ( 384 * m_nFLASHLIGHTDEPTHFILTERMODE ) + 0;
  192. }
  193. };
  194. #define shaderStaticTest_flashlight_ps20b psh_forgot_to_set_static_NORMALMAP + psh_forgot_to_set_static_NORMALMAP2 + psh_forgot_to_set_static_WORLDVERTEXTRANSITION + psh_forgot_to_set_static_SEAMLESS + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + 0
  195. class flashlight_ps20b_Dynamic_Index
  196. {
  197. private:
  198. int m_nPIXELFOGTYPE;
  199. #ifdef _DEBUG
  200. bool m_bPIXELFOGTYPE;
  201. #endif
  202. public:
  203. void SetPIXELFOGTYPE( int i )
  204. {
  205. Assert( i >= 0 && i <= 1 );
  206. m_nPIXELFOGTYPE = i;
  207. #ifdef _DEBUG
  208. m_bPIXELFOGTYPE = true;
  209. #endif
  210. }
  211. void SetPIXELFOGTYPE( bool i )
  212. {
  213. m_nPIXELFOGTYPE = i ? 1 : 0;
  214. #ifdef _DEBUG
  215. m_bPIXELFOGTYPE = true;
  216. #endif
  217. }
  218. private:
  219. int m_nFLASHLIGHTSHADOWS;
  220. #ifdef _DEBUG
  221. bool m_bFLASHLIGHTSHADOWS;
  222. #endif
  223. public:
  224. void SetFLASHLIGHTSHADOWS( int i )
  225. {
  226. Assert( i >= 0 && i <= 1 );
  227. m_nFLASHLIGHTSHADOWS = i;
  228. #ifdef _DEBUG
  229. m_bFLASHLIGHTSHADOWS = true;
  230. #endif
  231. }
  232. void SetFLASHLIGHTSHADOWS( bool i )
  233. {
  234. m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
  235. #ifdef _DEBUG
  236. m_bFLASHLIGHTSHADOWS = true;
  237. #endif
  238. }
  239. public:
  240. flashlight_ps20b_Dynamic_Index()
  241. {
  242. #ifdef _DEBUG
  243. m_bPIXELFOGTYPE = false;
  244. #endif // _DEBUG
  245. m_nPIXELFOGTYPE = 0;
  246. #ifdef _DEBUG
  247. m_bFLASHLIGHTSHADOWS = false;
  248. #endif // _DEBUG
  249. m_nFLASHLIGHTSHADOWS = 0;
  250. }
  251. int GetIndex()
  252. {
  253. // Asserts to make sure that we aren't using any skipped combinations.
  254. // Asserts to make sure that we are setting all of the combination vars.
  255. #ifdef _DEBUG
  256. bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE && m_bFLASHLIGHTSHADOWS;
  257. Assert( bAllDynamicVarsDefined );
  258. #endif // _DEBUG
  259. return ( 1 * m_nPIXELFOGTYPE ) + ( 2 * m_nFLASHLIGHTSHADOWS ) + 0;
  260. }
  261. };
  262. #define shaderDynamicTest_flashlight_ps20b psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + 0