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.

762 lines
16 KiB

  1. #include "shaderlib/cshader.h"
  2. class lightmappedgeneric_ps20b_Static_Index
  3. {
  4. private:
  5. int m_nMASKEDBLENDING;
  6. #ifdef _DEBUG
  7. bool m_bMASKEDBLENDING;
  8. #endif
  9. public:
  10. void SetMASKEDBLENDING( int i )
  11. {
  12. Assert( i >= 0 && i <= 1 );
  13. m_nMASKEDBLENDING = i;
  14. #ifdef _DEBUG
  15. m_bMASKEDBLENDING = true;
  16. #endif
  17. }
  18. void SetMASKEDBLENDING( bool i )
  19. {
  20. m_nMASKEDBLENDING = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bMASKEDBLENDING = true;
  23. #endif
  24. }
  25. private:
  26. int m_nBASETEXTURE2;
  27. #ifdef _DEBUG
  28. bool m_bBASETEXTURE2;
  29. #endif
  30. public:
  31. void SetBASETEXTURE2( int i )
  32. {
  33. Assert( i >= 0 && i <= 1 );
  34. m_nBASETEXTURE2 = i;
  35. #ifdef _DEBUG
  36. m_bBASETEXTURE2 = true;
  37. #endif
  38. }
  39. void SetBASETEXTURE2( bool i )
  40. {
  41. m_nBASETEXTURE2 = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bBASETEXTURE2 = true;
  44. #endif
  45. }
  46. private:
  47. int m_nDETAILTEXTURE;
  48. #ifdef _DEBUG
  49. bool m_bDETAILTEXTURE;
  50. #endif
  51. public:
  52. void SetDETAILTEXTURE( int i )
  53. {
  54. Assert( i >= 0 && i <= 1 );
  55. m_nDETAILTEXTURE = i;
  56. #ifdef _DEBUG
  57. m_bDETAILTEXTURE = true;
  58. #endif
  59. }
  60. void SetDETAILTEXTURE( bool i )
  61. {
  62. m_nDETAILTEXTURE = i ? 1 : 0;
  63. #ifdef _DEBUG
  64. m_bDETAILTEXTURE = true;
  65. #endif
  66. }
  67. private:
  68. int m_nBUMPMAP;
  69. #ifdef _DEBUG
  70. bool m_bBUMPMAP;
  71. #endif
  72. public:
  73. void SetBUMPMAP( int i )
  74. {
  75. Assert( i >= 0 && i <= 2 );
  76. m_nBUMPMAP = i;
  77. #ifdef _DEBUG
  78. m_bBUMPMAP = true;
  79. #endif
  80. }
  81. void SetBUMPMAP( bool i )
  82. {
  83. m_nBUMPMAP = i ? 1 : 0;
  84. #ifdef _DEBUG
  85. m_bBUMPMAP = true;
  86. #endif
  87. }
  88. private:
  89. int m_nBUMPMAP2;
  90. #ifdef _DEBUG
  91. bool m_bBUMPMAP2;
  92. #endif
  93. public:
  94. void SetBUMPMAP2( int i )
  95. {
  96. Assert( i >= 0 && i <= 1 );
  97. m_nBUMPMAP2 = i;
  98. #ifdef _DEBUG
  99. m_bBUMPMAP2 = true;
  100. #endif
  101. }
  102. void SetBUMPMAP2( bool i )
  103. {
  104. m_nBUMPMAP2 = i ? 1 : 0;
  105. #ifdef _DEBUG
  106. m_bBUMPMAP2 = true;
  107. #endif
  108. }
  109. private:
  110. int m_nCUBEMAP;
  111. #ifdef _DEBUG
  112. bool m_bCUBEMAP;
  113. #endif
  114. public:
  115. void SetCUBEMAP( int i )
  116. {
  117. Assert( i >= 0 && i <= 1 );
  118. m_nCUBEMAP = i;
  119. #ifdef _DEBUG
  120. m_bCUBEMAP = true;
  121. #endif
  122. }
  123. void SetCUBEMAP( bool i )
  124. {
  125. m_nCUBEMAP = i ? 1 : 0;
  126. #ifdef _DEBUG
  127. m_bCUBEMAP = true;
  128. #endif
  129. }
  130. private:
  131. int m_nENVMAPMASK;
  132. #ifdef _DEBUG
  133. bool m_bENVMAPMASK;
  134. #endif
  135. public:
  136. void SetENVMAPMASK( int i )
  137. {
  138. Assert( i >= 0 && i <= 1 );
  139. m_nENVMAPMASK = i;
  140. #ifdef _DEBUG
  141. m_bENVMAPMASK = true;
  142. #endif
  143. }
  144. void SetENVMAPMASK( bool i )
  145. {
  146. m_nENVMAPMASK = i ? 1 : 0;
  147. #ifdef _DEBUG
  148. m_bENVMAPMASK = true;
  149. #endif
  150. }
  151. private:
  152. int m_nBASEALPHAENVMAPMASK;
  153. #ifdef _DEBUG
  154. bool m_bBASEALPHAENVMAPMASK;
  155. #endif
  156. public:
  157. void SetBASEALPHAENVMAPMASK( int i )
  158. {
  159. Assert( i >= 0 && i <= 1 );
  160. m_nBASEALPHAENVMAPMASK = i;
  161. #ifdef _DEBUG
  162. m_bBASEALPHAENVMAPMASK = true;
  163. #endif
  164. }
  165. void SetBASEALPHAENVMAPMASK( bool i )
  166. {
  167. m_nBASEALPHAENVMAPMASK = i ? 1 : 0;
  168. #ifdef _DEBUG
  169. m_bBASEALPHAENVMAPMASK = true;
  170. #endif
  171. }
  172. private:
  173. int m_nSELFILLUM;
  174. #ifdef _DEBUG
  175. bool m_bSELFILLUM;
  176. #endif
  177. public:
  178. void SetSELFILLUM( int i )
  179. {
  180. Assert( i >= 0 && i <= 1 );
  181. m_nSELFILLUM = i;
  182. #ifdef _DEBUG
  183. m_bSELFILLUM = true;
  184. #endif
  185. }
  186. void SetSELFILLUM( bool i )
  187. {
  188. m_nSELFILLUM = i ? 1 : 0;
  189. #ifdef _DEBUG
  190. m_bSELFILLUM = true;
  191. #endif
  192. }
  193. private:
  194. int m_nNORMALMAPALPHAENVMAPMASK;
  195. #ifdef _DEBUG
  196. bool m_bNORMALMAPALPHAENVMAPMASK;
  197. #endif
  198. public:
  199. void SetNORMALMAPALPHAENVMAPMASK( int i )
  200. {
  201. Assert( i >= 0 && i <= 1 );
  202. m_nNORMALMAPALPHAENVMAPMASK = i;
  203. #ifdef _DEBUG
  204. m_bNORMALMAPALPHAENVMAPMASK = true;
  205. #endif
  206. }
  207. void SetNORMALMAPALPHAENVMAPMASK( bool i )
  208. {
  209. m_nNORMALMAPALPHAENVMAPMASK = i ? 1 : 0;
  210. #ifdef _DEBUG
  211. m_bNORMALMAPALPHAENVMAPMASK = true;
  212. #endif
  213. }
  214. private:
  215. int m_nDIFFUSEBUMPMAP;
  216. #ifdef _DEBUG
  217. bool m_bDIFFUSEBUMPMAP;
  218. #endif
  219. public:
  220. void SetDIFFUSEBUMPMAP( int i )
  221. {
  222. Assert( i >= 0 && i <= 1 );
  223. m_nDIFFUSEBUMPMAP = i;
  224. #ifdef _DEBUG
  225. m_bDIFFUSEBUMPMAP = true;
  226. #endif
  227. }
  228. void SetDIFFUSEBUMPMAP( bool i )
  229. {
  230. m_nDIFFUSEBUMPMAP = i ? 1 : 0;
  231. #ifdef _DEBUG
  232. m_bDIFFUSEBUMPMAP = true;
  233. #endif
  234. }
  235. private:
  236. int m_nBASETEXTURENOENVMAP;
  237. #ifdef _DEBUG
  238. bool m_bBASETEXTURENOENVMAP;
  239. #endif
  240. public:
  241. void SetBASETEXTURENOENVMAP( int i )
  242. {
  243. Assert( i >= 0 && i <= 1 );
  244. m_nBASETEXTURENOENVMAP = i;
  245. #ifdef _DEBUG
  246. m_bBASETEXTURENOENVMAP = true;
  247. #endif
  248. }
  249. void SetBASETEXTURENOENVMAP( bool i )
  250. {
  251. m_nBASETEXTURENOENVMAP = i ? 1 : 0;
  252. #ifdef _DEBUG
  253. m_bBASETEXTURENOENVMAP = true;
  254. #endif
  255. }
  256. private:
  257. int m_nBASETEXTURE2NOENVMAP;
  258. #ifdef _DEBUG
  259. bool m_bBASETEXTURE2NOENVMAP;
  260. #endif
  261. public:
  262. void SetBASETEXTURE2NOENVMAP( int i )
  263. {
  264. Assert( i >= 0 && i <= 1 );
  265. m_nBASETEXTURE2NOENVMAP = i;
  266. #ifdef _DEBUG
  267. m_bBASETEXTURE2NOENVMAP = true;
  268. #endif
  269. }
  270. void SetBASETEXTURE2NOENVMAP( bool i )
  271. {
  272. m_nBASETEXTURE2NOENVMAP = i ? 1 : 0;
  273. #ifdef _DEBUG
  274. m_bBASETEXTURE2NOENVMAP = true;
  275. #endif
  276. }
  277. private:
  278. int m_nWARPLIGHTING;
  279. #ifdef _DEBUG
  280. bool m_bWARPLIGHTING;
  281. #endif
  282. public:
  283. void SetWARPLIGHTING( int i )
  284. {
  285. Assert( i >= 0 && i <= 1 );
  286. m_nWARPLIGHTING = i;
  287. #ifdef _DEBUG
  288. m_bWARPLIGHTING = true;
  289. #endif
  290. }
  291. void SetWARPLIGHTING( bool i )
  292. {
  293. m_nWARPLIGHTING = i ? 1 : 0;
  294. #ifdef _DEBUG
  295. m_bWARPLIGHTING = true;
  296. #endif
  297. }
  298. private:
  299. int m_nFANCY_BLENDING;
  300. #ifdef _DEBUG
  301. bool m_bFANCY_BLENDING;
  302. #endif
  303. public:
  304. void SetFANCY_BLENDING( int i )
  305. {
  306. Assert( i >= 0 && i <= 1 );
  307. m_nFANCY_BLENDING = i;
  308. #ifdef _DEBUG
  309. m_bFANCY_BLENDING = true;
  310. #endif
  311. }
  312. void SetFANCY_BLENDING( bool i )
  313. {
  314. m_nFANCY_BLENDING = i ? 1 : 0;
  315. #ifdef _DEBUG
  316. m_bFANCY_BLENDING = true;
  317. #endif
  318. }
  319. private:
  320. int m_nRELIEF_MAPPING;
  321. #ifdef _DEBUG
  322. bool m_bRELIEF_MAPPING;
  323. #endif
  324. public:
  325. void SetRELIEF_MAPPING( int i )
  326. {
  327. Assert( i >= 0 && i <= 0 );
  328. m_nRELIEF_MAPPING = i;
  329. #ifdef _DEBUG
  330. m_bRELIEF_MAPPING = true;
  331. #endif
  332. }
  333. void SetRELIEF_MAPPING( bool i )
  334. {
  335. m_nRELIEF_MAPPING = i ? 1 : 0;
  336. #ifdef _DEBUG
  337. m_bRELIEF_MAPPING = true;
  338. #endif
  339. }
  340. private:
  341. int m_nSEAMLESS;
  342. #ifdef _DEBUG
  343. bool m_bSEAMLESS;
  344. #endif
  345. public:
  346. void SetSEAMLESS( int i )
  347. {
  348. Assert( i >= 0 && i <= 1 );
  349. m_nSEAMLESS = i;
  350. #ifdef _DEBUG
  351. m_bSEAMLESS = true;
  352. #endif
  353. }
  354. void SetSEAMLESS( bool i )
  355. {
  356. m_nSEAMLESS = i ? 1 : 0;
  357. #ifdef _DEBUG
  358. m_bSEAMLESS = true;
  359. #endif
  360. }
  361. private:
  362. int m_nOUTLINE;
  363. #ifdef _DEBUG
  364. bool m_bOUTLINE;
  365. #endif
  366. public:
  367. void SetOUTLINE( int i )
  368. {
  369. Assert( i >= 0 && i <= 1 );
  370. m_nOUTLINE = i;
  371. #ifdef _DEBUG
  372. m_bOUTLINE = true;
  373. #endif
  374. }
  375. void SetOUTLINE( bool i )
  376. {
  377. m_nOUTLINE = i ? 1 : 0;
  378. #ifdef _DEBUG
  379. m_bOUTLINE = true;
  380. #endif
  381. }
  382. private:
  383. int m_nSOFTEDGES;
  384. #ifdef _DEBUG
  385. bool m_bSOFTEDGES;
  386. #endif
  387. public:
  388. void SetSOFTEDGES( int i )
  389. {
  390. Assert( i >= 0 && i <= 1 );
  391. m_nSOFTEDGES = i;
  392. #ifdef _DEBUG
  393. m_bSOFTEDGES = true;
  394. #endif
  395. }
  396. void SetSOFTEDGES( bool i )
  397. {
  398. m_nSOFTEDGES = i ? 1 : 0;
  399. #ifdef _DEBUG
  400. m_bSOFTEDGES = true;
  401. #endif
  402. }
  403. private:
  404. int m_nBUMPMASK;
  405. #ifdef _DEBUG
  406. bool m_bBUMPMASK;
  407. #endif
  408. public:
  409. void SetBUMPMASK( int i )
  410. {
  411. Assert( i >= 0 && i <= 1 );
  412. m_nBUMPMASK = i;
  413. #ifdef _DEBUG
  414. m_bBUMPMASK = true;
  415. #endif
  416. }
  417. void SetBUMPMASK( bool i )
  418. {
  419. m_nBUMPMASK = i ? 1 : 0;
  420. #ifdef _DEBUG
  421. m_bBUMPMASK = true;
  422. #endif
  423. }
  424. private:
  425. int m_nNORMAL_DECODE_MODE;
  426. #ifdef _DEBUG
  427. bool m_bNORMAL_DECODE_MODE;
  428. #endif
  429. public:
  430. void SetNORMAL_DECODE_MODE( int i )
  431. {
  432. Assert( i >= 0 && i <= 0 );
  433. m_nNORMAL_DECODE_MODE = i;
  434. #ifdef _DEBUG
  435. m_bNORMAL_DECODE_MODE = true;
  436. #endif
  437. }
  438. void SetNORMAL_DECODE_MODE( bool i )
  439. {
  440. m_nNORMAL_DECODE_MODE = i ? 1 : 0;
  441. #ifdef _DEBUG
  442. m_bNORMAL_DECODE_MODE = true;
  443. #endif
  444. }
  445. private:
  446. int m_nNORMALMASK_DECODE_MODE;
  447. #ifdef _DEBUG
  448. bool m_bNORMALMASK_DECODE_MODE;
  449. #endif
  450. public:
  451. void SetNORMALMASK_DECODE_MODE( int i )
  452. {
  453. Assert( i >= 0 && i <= 0 );
  454. m_nNORMALMASK_DECODE_MODE = i;
  455. #ifdef _DEBUG
  456. m_bNORMALMASK_DECODE_MODE = true;
  457. #endif
  458. }
  459. void SetNORMALMASK_DECODE_MODE( bool i )
  460. {
  461. m_nNORMALMASK_DECODE_MODE = i ? 1 : 0;
  462. #ifdef _DEBUG
  463. m_bNORMALMASK_DECODE_MODE = true;
  464. #endif
  465. }
  466. private:
  467. int m_nDETAIL_BLEND_MODE;
  468. #ifdef _DEBUG
  469. bool m_bDETAIL_BLEND_MODE;
  470. #endif
  471. public:
  472. void SetDETAIL_BLEND_MODE( int i )
  473. {
  474. Assert( i >= 0 && i <= 11 );
  475. m_nDETAIL_BLEND_MODE = i;
  476. #ifdef _DEBUG
  477. m_bDETAIL_BLEND_MODE = true;
  478. #endif
  479. }
  480. void SetDETAIL_BLEND_MODE( bool i )
  481. {
  482. m_nDETAIL_BLEND_MODE = i ? 1 : 0;
  483. #ifdef _DEBUG
  484. m_bDETAIL_BLEND_MODE = true;
  485. #endif
  486. }
  487. public:
  488. lightmappedgeneric_ps20b_Static_Index( )
  489. {
  490. #ifdef _DEBUG
  491. m_bMASKEDBLENDING = false;
  492. #endif // _DEBUG
  493. m_nMASKEDBLENDING = 0;
  494. #ifdef _DEBUG
  495. m_bBASETEXTURE2 = false;
  496. #endif // _DEBUG
  497. m_nBASETEXTURE2 = 0;
  498. #ifdef _DEBUG
  499. m_bDETAILTEXTURE = false;
  500. #endif // _DEBUG
  501. m_nDETAILTEXTURE = 0;
  502. #ifdef _DEBUG
  503. m_bBUMPMAP = false;
  504. #endif // _DEBUG
  505. m_nBUMPMAP = 0;
  506. #ifdef _DEBUG
  507. m_bBUMPMAP2 = false;
  508. #endif // _DEBUG
  509. m_nBUMPMAP2 = 0;
  510. #ifdef _DEBUG
  511. m_bCUBEMAP = false;
  512. #endif // _DEBUG
  513. m_nCUBEMAP = 0;
  514. #ifdef _DEBUG
  515. m_bENVMAPMASK = false;
  516. #endif // _DEBUG
  517. m_nENVMAPMASK = 0;
  518. #ifdef _DEBUG
  519. m_bBASEALPHAENVMAPMASK = false;
  520. #endif // _DEBUG
  521. m_nBASEALPHAENVMAPMASK = 0;
  522. #ifdef _DEBUG
  523. m_bSELFILLUM = false;
  524. #endif // _DEBUG
  525. m_nSELFILLUM = 0;
  526. #ifdef _DEBUG
  527. m_bNORMALMAPALPHAENVMAPMASK = false;
  528. #endif // _DEBUG
  529. m_nNORMALMAPALPHAENVMAPMASK = 0;
  530. #ifdef _DEBUG
  531. m_bDIFFUSEBUMPMAP = false;
  532. #endif // _DEBUG
  533. m_nDIFFUSEBUMPMAP = 0;
  534. #ifdef _DEBUG
  535. m_bBASETEXTURENOENVMAP = false;
  536. #endif // _DEBUG
  537. m_nBASETEXTURENOENVMAP = 0;
  538. #ifdef _DEBUG
  539. m_bBASETEXTURE2NOENVMAP = false;
  540. #endif // _DEBUG
  541. m_nBASETEXTURE2NOENVMAP = 0;
  542. #ifdef _DEBUG
  543. m_bWARPLIGHTING = false;
  544. #endif // _DEBUG
  545. m_nWARPLIGHTING = 0;
  546. #ifdef _DEBUG
  547. m_bFANCY_BLENDING = false;
  548. #endif // _DEBUG
  549. m_nFANCY_BLENDING = 0;
  550. #ifdef _DEBUG
  551. m_bRELIEF_MAPPING = false;
  552. #endif // _DEBUG
  553. m_nRELIEF_MAPPING = 0;
  554. #ifdef _DEBUG
  555. m_bSEAMLESS = false;
  556. #endif // _DEBUG
  557. m_nSEAMLESS = 0;
  558. #ifdef _DEBUG
  559. m_bOUTLINE = false;
  560. #endif // _DEBUG
  561. m_nOUTLINE = 0;
  562. #ifdef _DEBUG
  563. m_bSOFTEDGES = false;
  564. #endif // _DEBUG
  565. m_nSOFTEDGES = 0;
  566. #ifdef _DEBUG
  567. m_bBUMPMASK = false;
  568. #endif // _DEBUG
  569. m_nBUMPMASK = 0;
  570. #ifdef _DEBUG
  571. m_bNORMAL_DECODE_MODE = false;
  572. #endif // _DEBUG
  573. m_nNORMAL_DECODE_MODE = 0;
  574. #ifdef _DEBUG
  575. m_bNORMALMASK_DECODE_MODE = false;
  576. #endif // _DEBUG
  577. m_nNORMALMASK_DECODE_MODE = 0;
  578. #ifdef _DEBUG
  579. m_bDETAIL_BLEND_MODE = false;
  580. #endif // _DEBUG
  581. m_nDETAIL_BLEND_MODE = 0;
  582. }
  583. int GetIndex()
  584. {
  585. // Asserts to make sure that we aren't using any skipped combinations.
  586. // Asserts to make sure that we are setting all of the combination vars.
  587. #ifdef _DEBUG
  588. bool bAllStaticVarsDefined = m_bMASKEDBLENDING && m_bBASETEXTURE2 && m_bDETAILTEXTURE && m_bBUMPMAP && m_bBUMPMAP2 && m_bCUBEMAP && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bNORMALMAPALPHAENVMAPMASK && m_bDIFFUSEBUMPMAP && m_bBASETEXTURENOENVMAP && m_bBASETEXTURE2NOENVMAP && m_bWARPLIGHTING && m_bFANCY_BLENDING && m_bRELIEF_MAPPING && m_bSEAMLESS && m_bOUTLINE && m_bSOFTEDGES && m_bBUMPMASK && m_bNORMAL_DECODE_MODE && m_bNORMALMASK_DECODE_MODE && m_bDETAIL_BLEND_MODE;
  589. Assert( bAllStaticVarsDefined );
  590. #endif // _DEBUG
  591. return ( 96 * m_nMASKEDBLENDING ) + ( 192 * m_nBASETEXTURE2 ) + ( 384 * m_nDETAILTEXTURE ) + ( 768 * m_nBUMPMAP ) + ( 2304 * m_nBUMPMAP2 ) + ( 4608 * m_nCUBEMAP ) + ( 9216 * m_nENVMAPMASK ) + ( 18432 * m_nBASEALPHAENVMAPMASK ) + ( 36864 * m_nSELFILLUM ) + ( 73728 * m_nNORMALMAPALPHAENVMAPMASK ) + ( 147456 * m_nDIFFUSEBUMPMAP ) + ( 294912 * m_nBASETEXTURENOENVMAP ) + ( 589824 * m_nBASETEXTURE2NOENVMAP ) + ( 1179648 * m_nWARPLIGHTING ) + ( 2359296 * m_nFANCY_BLENDING ) + ( 4718592 * m_nRELIEF_MAPPING ) + ( 4718592 * m_nSEAMLESS ) + ( 9437184 * m_nOUTLINE ) + ( 18874368 * m_nSOFTEDGES ) + ( 37748736 * m_nBUMPMASK ) + ( 75497472 * m_nNORMAL_DECODE_MODE ) + ( 75497472 * m_nNORMALMASK_DECODE_MODE ) + ( 75497472 * m_nDETAIL_BLEND_MODE ) + 0;
  592. }
  593. };
  594. #define shaderStaticTest_lightmappedgeneric_ps20b psh_forgot_to_set_static_MASKEDBLENDING + psh_forgot_to_set_static_BASETEXTURE2 + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_BUMPMAP + psh_forgot_to_set_static_BUMPMAP2 + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_NORMALMAPALPHAENVMAPMASK + psh_forgot_to_set_static_DIFFUSEBUMPMAP + psh_forgot_to_set_static_BASETEXTURENOENVMAP + psh_forgot_to_set_static_BASETEXTURE2NOENVMAP + psh_forgot_to_set_static_WARPLIGHTING + psh_forgot_to_set_static_FANCY_BLENDING + psh_forgot_to_set_static_RELIEF_MAPPING + psh_forgot_to_set_static_SEAMLESS + psh_forgot_to_set_static_OUTLINE + psh_forgot_to_set_static_SOFTEDGES + psh_forgot_to_set_static_BUMPMASK + psh_forgot_to_set_static_NORMAL_DECODE_MODE + psh_forgot_to_set_static_NORMALMASK_DECODE_MODE + psh_forgot_to_set_static_DETAIL_BLEND_MODE + 0
  595. class lightmappedgeneric_ps20b_Dynamic_Index
  596. {
  597. private:
  598. int m_nFASTPATHENVMAPCONTRAST;
  599. #ifdef _DEBUG
  600. bool m_bFASTPATHENVMAPCONTRAST;
  601. #endif
  602. public:
  603. void SetFASTPATHENVMAPCONTRAST( int i )
  604. {
  605. Assert( i >= 0 && i <= 1 );
  606. m_nFASTPATHENVMAPCONTRAST = i;
  607. #ifdef _DEBUG
  608. m_bFASTPATHENVMAPCONTRAST = true;
  609. #endif
  610. }
  611. void SetFASTPATHENVMAPCONTRAST( bool i )
  612. {
  613. m_nFASTPATHENVMAPCONTRAST = i ? 1 : 0;
  614. #ifdef _DEBUG
  615. m_bFASTPATHENVMAPCONTRAST = true;
  616. #endif
  617. }
  618. private:
  619. int m_nFASTPATH;
  620. #ifdef _DEBUG
  621. bool m_bFASTPATH;
  622. #endif
  623. public:
  624. void SetFASTPATH( int i )
  625. {
  626. Assert( i >= 0 && i <= 1 );
  627. m_nFASTPATH = i;
  628. #ifdef _DEBUG
  629. m_bFASTPATH = true;
  630. #endif
  631. }
  632. void SetFASTPATH( bool i )
  633. {
  634. m_nFASTPATH = i ? 1 : 0;
  635. #ifdef _DEBUG
  636. m_bFASTPATH = true;
  637. #endif
  638. }
  639. private:
  640. int m_nWRITEWATERFOGTODESTALPHA;
  641. #ifdef _DEBUG
  642. bool m_bWRITEWATERFOGTODESTALPHA;
  643. #endif
  644. public:
  645. void SetWRITEWATERFOGTODESTALPHA( int i )
  646. {
  647. Assert( i >= 0 && i <= 1 );
  648. m_nWRITEWATERFOGTODESTALPHA = i;
  649. #ifdef _DEBUG
  650. m_bWRITEWATERFOGTODESTALPHA = true;
  651. #endif
  652. }
  653. void SetWRITEWATERFOGTODESTALPHA( bool i )
  654. {
  655. m_nWRITEWATERFOGTODESTALPHA = i ? 1 : 0;
  656. #ifdef _DEBUG
  657. m_bWRITEWATERFOGTODESTALPHA = true;
  658. #endif
  659. }
  660. private:
  661. int m_nPIXELFOGTYPE;
  662. #ifdef _DEBUG
  663. bool m_bPIXELFOGTYPE;
  664. #endif
  665. public:
  666. void SetPIXELFOGTYPE( int i )
  667. {
  668. Assert( i >= 0 && i <= 1 );
  669. m_nPIXELFOGTYPE = i;
  670. #ifdef _DEBUG
  671. m_bPIXELFOGTYPE = true;
  672. #endif
  673. }
  674. void SetPIXELFOGTYPE( bool i )
  675. {
  676. m_nPIXELFOGTYPE = i ? 1 : 0;
  677. #ifdef _DEBUG
  678. m_bPIXELFOGTYPE = true;
  679. #endif
  680. }
  681. private:
  682. int m_nLIGHTING_PREVIEW;
  683. #ifdef _DEBUG
  684. bool m_bLIGHTING_PREVIEW;
  685. #endif
  686. public:
  687. void SetLIGHTING_PREVIEW( int i )
  688. {
  689. Assert( i >= 0 && i <= 2 );
  690. m_nLIGHTING_PREVIEW = i;
  691. #ifdef _DEBUG
  692. m_bLIGHTING_PREVIEW = true;
  693. #endif
  694. }
  695. void SetLIGHTING_PREVIEW( bool i )
  696. {
  697. m_nLIGHTING_PREVIEW = i ? 1 : 0;
  698. #ifdef _DEBUG
  699. m_bLIGHTING_PREVIEW = true;
  700. #endif
  701. }
  702. private:
  703. int m_nWRITE_DEPTH_TO_DESTALPHA;
  704. #ifdef _DEBUG
  705. bool m_bWRITE_DEPTH_TO_DESTALPHA;
  706. #endif
  707. public:
  708. void SetWRITE_DEPTH_TO_DESTALPHA( int i )
  709. {
  710. Assert( i >= 0 && i <= 1 );
  711. m_nWRITE_DEPTH_TO_DESTALPHA = i;
  712. #ifdef _DEBUG
  713. m_bWRITE_DEPTH_TO_DESTALPHA = true;
  714. #endif
  715. }
  716. void SetWRITE_DEPTH_TO_DESTALPHA( bool i )
  717. {
  718. m_nWRITE_DEPTH_TO_DESTALPHA = i ? 1 : 0;
  719. #ifdef _DEBUG
  720. m_bWRITE_DEPTH_TO_DESTALPHA = true;
  721. #endif
  722. }
  723. public:
  724. lightmappedgeneric_ps20b_Dynamic_Index()
  725. {
  726. #ifdef _DEBUG
  727. m_bFASTPATHENVMAPCONTRAST = false;
  728. #endif // _DEBUG
  729. m_nFASTPATHENVMAPCONTRAST = 0;
  730. #ifdef _DEBUG
  731. m_bFASTPATH = false;
  732. #endif // _DEBUG
  733. m_nFASTPATH = 0;
  734. #ifdef _DEBUG
  735. m_bWRITEWATERFOGTODESTALPHA = false;
  736. #endif // _DEBUG
  737. m_nWRITEWATERFOGTODESTALPHA = 0;
  738. #ifdef _DEBUG
  739. m_bPIXELFOGTYPE = false;
  740. #endif // _DEBUG
  741. m_nPIXELFOGTYPE = 0;
  742. #ifdef _DEBUG
  743. m_bLIGHTING_PREVIEW = false;
  744. #endif // _DEBUG
  745. m_nLIGHTING_PREVIEW = 0;
  746. #ifdef _DEBUG
  747. m_bWRITE_DEPTH_TO_DESTALPHA = false;
  748. #endif // _DEBUG
  749. m_nWRITE_DEPTH_TO_DESTALPHA = 0;
  750. }
  751. int GetIndex()
  752. {
  753. // Asserts to make sure that we aren't using any skipped combinations.
  754. // Asserts to make sure that we are setting all of the combination vars.
  755. #ifdef _DEBUG
  756. bool bAllDynamicVarsDefined = m_bFASTPATHENVMAPCONTRAST && m_bFASTPATH && m_bWRITEWATERFOGTODESTALPHA && m_bPIXELFOGTYPE && m_bLIGHTING_PREVIEW && m_bWRITE_DEPTH_TO_DESTALPHA;
  757. Assert( bAllDynamicVarsDefined );
  758. #endif // _DEBUG
  759. return ( 1 * m_nFASTPATHENVMAPCONTRAST ) + ( 2 * m_nFASTPATH ) + ( 4 * m_nWRITEWATERFOGTODESTALPHA ) + ( 8 * m_nPIXELFOGTYPE ) + ( 16 * m_nLIGHTING_PREVIEW ) + ( 48 * m_nWRITE_DEPTH_TO_DESTALPHA ) + 0;
  760. }
  761. };
  762. #define shaderDynamicTest_lightmappedgeneric_ps20b psh_forgot_to_set_dynamic_FASTPATHENVMAPCONTRAST + psh_forgot_to_set_dynamic_FASTPATH + psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_LIGHTING_PREVIEW + psh_forgot_to_set_dynamic_WRITE_DEPTH_TO_DESTALPHA + 0