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.

312 lines
6.1 KiB

  1. #include "shaderlib/cshader.h"
  2. class pyro_vision_ps30_Static_Index
  3. {
  4. private:
  5. int m_nEFFECT;
  6. #ifdef _DEBUG
  7. bool m_bEFFECT;
  8. #endif
  9. public:
  10. void SetEFFECT( int i )
  11. {
  12. Assert( i >= 0 && i <= 3 );
  13. m_nEFFECT = i;
  14. #ifdef _DEBUG
  15. m_bEFFECT = true;
  16. #endif
  17. }
  18. void SetEFFECT( bool i )
  19. {
  20. m_nEFFECT = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bEFFECT = true;
  23. #endif
  24. }
  25. private:
  26. int m_nVERTEX_LIT;
  27. #ifdef _DEBUG
  28. bool m_bVERTEX_LIT;
  29. #endif
  30. public:
  31. void SetVERTEX_LIT( int i )
  32. {
  33. Assert( i >= 0 && i <= 1 );
  34. m_nVERTEX_LIT = i;
  35. #ifdef _DEBUG
  36. m_bVERTEX_LIT = true;
  37. #endif
  38. }
  39. void SetVERTEX_LIT( bool i )
  40. {
  41. m_nVERTEX_LIT = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bVERTEX_LIT = true;
  44. #endif
  45. }
  46. private:
  47. int m_nBASETEXTURE2;
  48. #ifdef _DEBUG
  49. bool m_bBASETEXTURE2;
  50. #endif
  51. public:
  52. void SetBASETEXTURE2( int i )
  53. {
  54. Assert( i >= 0 && i <= 1 );
  55. m_nBASETEXTURE2 = i;
  56. #ifdef _DEBUG
  57. m_bBASETEXTURE2 = true;
  58. #endif
  59. }
  60. void SetBASETEXTURE2( bool i )
  61. {
  62. m_nBASETEXTURE2 = i ? 1 : 0;
  63. #ifdef _DEBUG
  64. m_bBASETEXTURE2 = true;
  65. #endif
  66. }
  67. private:
  68. int m_nFANCY_BLENDING;
  69. #ifdef _DEBUG
  70. bool m_bFANCY_BLENDING;
  71. #endif
  72. public:
  73. void SetFANCY_BLENDING( int i )
  74. {
  75. Assert( i >= 0 && i <= 1 );
  76. m_nFANCY_BLENDING = i;
  77. #ifdef _DEBUG
  78. m_bFANCY_BLENDING = true;
  79. #endif
  80. }
  81. void SetFANCY_BLENDING( bool i )
  82. {
  83. m_nFANCY_BLENDING = i ? 1 : 0;
  84. #ifdef _DEBUG
  85. m_bFANCY_BLENDING = true;
  86. #endif
  87. }
  88. private:
  89. int m_nSELFILLUM;
  90. #ifdef _DEBUG
  91. bool m_bSELFILLUM;
  92. #endif
  93. public:
  94. void SetSELFILLUM( int i )
  95. {
  96. Assert( i >= 0 && i <= 1 );
  97. m_nSELFILLUM = i;
  98. #ifdef _DEBUG
  99. m_bSELFILLUM = true;
  100. #endif
  101. }
  102. void SetSELFILLUM( bool i )
  103. {
  104. m_nSELFILLUM = i ? 1 : 0;
  105. #ifdef _DEBUG
  106. m_bSELFILLUM = true;
  107. #endif
  108. }
  109. private:
  110. int m_nCOLOR_BAR;
  111. #ifdef _DEBUG
  112. bool m_bCOLOR_BAR;
  113. #endif
  114. public:
  115. void SetCOLOR_BAR( int i )
  116. {
  117. Assert( i >= 0 && i <= 1 );
  118. m_nCOLOR_BAR = i;
  119. #ifdef _DEBUG
  120. m_bCOLOR_BAR = true;
  121. #endif
  122. }
  123. void SetCOLOR_BAR( bool i )
  124. {
  125. m_nCOLOR_BAR = i ? 1 : 0;
  126. #ifdef _DEBUG
  127. m_bCOLOR_BAR = true;
  128. #endif
  129. }
  130. private:
  131. int m_nSTRIPES;
  132. #ifdef _DEBUG
  133. bool m_bSTRIPES;
  134. #endif
  135. public:
  136. void SetSTRIPES( int i )
  137. {
  138. Assert( i >= 0 && i <= 1 );
  139. m_nSTRIPES = i;
  140. #ifdef _DEBUG
  141. m_bSTRIPES = true;
  142. #endif
  143. }
  144. void SetSTRIPES( bool i )
  145. {
  146. m_nSTRIPES = i ? 1 : 0;
  147. #ifdef _DEBUG
  148. m_bSTRIPES = true;
  149. #endif
  150. }
  151. private:
  152. int m_nSTRIPES_USE_NORMAL2;
  153. #ifdef _DEBUG
  154. bool m_bSTRIPES_USE_NORMAL2;
  155. #endif
  156. public:
  157. void SetSTRIPES_USE_NORMAL2( int i )
  158. {
  159. Assert( i >= 0 && i <= 1 );
  160. m_nSTRIPES_USE_NORMAL2 = i;
  161. #ifdef _DEBUG
  162. m_bSTRIPES_USE_NORMAL2 = true;
  163. #endif
  164. }
  165. void SetSTRIPES_USE_NORMAL2( bool i )
  166. {
  167. m_nSTRIPES_USE_NORMAL2 = i ? 1 : 0;
  168. #ifdef _DEBUG
  169. m_bSTRIPES_USE_NORMAL2 = true;
  170. #endif
  171. }
  172. public:
  173. pyro_vision_ps30_Static_Index( )
  174. {
  175. #ifdef _DEBUG
  176. m_bEFFECT = false;
  177. #endif // _DEBUG
  178. m_nEFFECT = 0;
  179. #ifdef _DEBUG
  180. m_bVERTEX_LIT = false;
  181. #endif // _DEBUG
  182. m_nVERTEX_LIT = 0;
  183. #ifdef _DEBUG
  184. m_bBASETEXTURE2 = false;
  185. #endif // _DEBUG
  186. m_nBASETEXTURE2 = 0;
  187. #ifdef _DEBUG
  188. m_bFANCY_BLENDING = false;
  189. #endif // _DEBUG
  190. m_nFANCY_BLENDING = 0;
  191. #ifdef _DEBUG
  192. m_bSELFILLUM = false;
  193. #endif // _DEBUG
  194. m_nSELFILLUM = 0;
  195. #ifdef _DEBUG
  196. m_bCOLOR_BAR = false;
  197. #endif // _DEBUG
  198. m_nCOLOR_BAR = 0;
  199. #ifdef _DEBUG
  200. m_bSTRIPES = false;
  201. #endif // _DEBUG
  202. m_nSTRIPES = 0;
  203. #ifdef _DEBUG
  204. m_bSTRIPES_USE_NORMAL2 = false;
  205. #endif // _DEBUG
  206. m_nSTRIPES_USE_NORMAL2 = 0;
  207. }
  208. int GetIndex()
  209. {
  210. // Asserts to make sure that we aren't using any skipped combinations.
  211. // Asserts to make sure that we are setting all of the combination vars.
  212. #ifdef _DEBUG
  213. bool bAllStaticVarsDefined = m_bEFFECT && m_bVERTEX_LIT && m_bBASETEXTURE2 && m_bFANCY_BLENDING && m_bSELFILLUM && m_bCOLOR_BAR && m_bSTRIPES && m_bSTRIPES_USE_NORMAL2;
  214. Assert( bAllStaticVarsDefined );
  215. #endif // _DEBUG
  216. return ( 8 * m_nEFFECT ) + ( 32 * m_nVERTEX_LIT ) + ( 64 * m_nBASETEXTURE2 ) + ( 128 * m_nFANCY_BLENDING ) + ( 256 * m_nSELFILLUM ) + ( 512 * m_nCOLOR_BAR ) + ( 1024 * m_nSTRIPES ) + ( 2048 * m_nSTRIPES_USE_NORMAL2 ) + 0;
  217. }
  218. };
  219. #define shaderStaticTest_pyro_vision_ps30 psh_forgot_to_set_static_EFFECT + psh_forgot_to_set_static_VERTEX_LIT + psh_forgot_to_set_static_BASETEXTURE2 + psh_forgot_to_set_static_FANCY_BLENDING + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_COLOR_BAR + psh_forgot_to_set_static_STRIPES + psh_forgot_to_set_static_STRIPES_USE_NORMAL2 + 0
  220. class pyro_vision_ps30_Dynamic_Index
  221. {
  222. private:
  223. int m_nPIXELFOGTYPE;
  224. #ifdef _DEBUG
  225. bool m_bPIXELFOGTYPE;
  226. #endif
  227. public:
  228. void SetPIXELFOGTYPE( int i )
  229. {
  230. Assert( i >= 0 && i <= 1 );
  231. m_nPIXELFOGTYPE = i;
  232. #ifdef _DEBUG
  233. m_bPIXELFOGTYPE = true;
  234. #endif
  235. }
  236. void SetPIXELFOGTYPE( bool i )
  237. {
  238. m_nPIXELFOGTYPE = i ? 1 : 0;
  239. #ifdef _DEBUG
  240. m_bPIXELFOGTYPE = true;
  241. #endif
  242. }
  243. private:
  244. int m_nVISUALIZE_DOF;
  245. #ifdef _DEBUG
  246. bool m_bVISUALIZE_DOF;
  247. #endif
  248. public:
  249. void SetVISUALIZE_DOF( int i )
  250. {
  251. Assert( i >= 0 && i <= 1 );
  252. m_nVISUALIZE_DOF = i;
  253. #ifdef _DEBUG
  254. m_bVISUALIZE_DOF = true;
  255. #endif
  256. }
  257. void SetVISUALIZE_DOF( bool i )
  258. {
  259. m_nVISUALIZE_DOF = i ? 1 : 0;
  260. #ifdef _DEBUG
  261. m_bVISUALIZE_DOF = true;
  262. #endif
  263. }
  264. private:
  265. int m_nHEATHAZE;
  266. #ifdef _DEBUG
  267. bool m_bHEATHAZE;
  268. #endif
  269. public:
  270. void SetHEATHAZE( int i )
  271. {
  272. Assert( i >= 0 && i <= 1 );
  273. m_nHEATHAZE = i;
  274. #ifdef _DEBUG
  275. m_bHEATHAZE = true;
  276. #endif
  277. }
  278. void SetHEATHAZE( bool i )
  279. {
  280. m_nHEATHAZE = i ? 1 : 0;
  281. #ifdef _DEBUG
  282. m_bHEATHAZE = true;
  283. #endif
  284. }
  285. public:
  286. pyro_vision_ps30_Dynamic_Index()
  287. {
  288. #ifdef _DEBUG
  289. m_bPIXELFOGTYPE = false;
  290. #endif // _DEBUG
  291. m_nPIXELFOGTYPE = 0;
  292. #ifdef _DEBUG
  293. m_bVISUALIZE_DOF = false;
  294. #endif // _DEBUG
  295. m_nVISUALIZE_DOF = 0;
  296. #ifdef _DEBUG
  297. m_bHEATHAZE = false;
  298. #endif // _DEBUG
  299. m_nHEATHAZE = 0;
  300. }
  301. int GetIndex()
  302. {
  303. // Asserts to make sure that we aren't using any skipped combinations.
  304. // Asserts to make sure that we are setting all of the combination vars.
  305. #ifdef _DEBUG
  306. bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE && m_bVISUALIZE_DOF && m_bHEATHAZE;
  307. Assert( bAllDynamicVarsDefined );
  308. #endif // _DEBUG
  309. return ( 1 * m_nPIXELFOGTYPE ) + ( 2 * m_nVISUALIZE_DOF ) + ( 4 * m_nHEATHAZE ) + 0;
  310. }
  311. };
  312. #define shaderDynamicTest_pyro_vision_ps30 psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_VISUALIZE_DOF + psh_forgot_to_set_dynamic_HEATHAZE + 0