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.

186 lines
3.8 KiB

  1. class particlelit_generic_ps30_Static_Index
  2. {
  3. private:
  4. int m_nHALFLAMBERT;
  5. #ifdef _DEBUG
  6. bool m_bHALFLAMBERT;
  7. #endif
  8. public:
  9. void SetHALFLAMBERT( int i )
  10. {
  11. Assert( i >= 0 && i <= 1 );
  12. m_nHALFLAMBERT = i;
  13. #ifdef _DEBUG
  14. m_bHALFLAMBERT = true;
  15. #endif
  16. }
  17. void SetHALFLAMBERT( bool i )
  18. {
  19. m_nHALFLAMBERT = i ? 1 : 0;
  20. #ifdef _DEBUG
  21. m_bHALFLAMBERT = true;
  22. #endif
  23. }
  24. private:
  25. int m_nHDRTYPE;
  26. #ifdef _DEBUG
  27. bool m_bHDRTYPE;
  28. #endif
  29. public:
  30. void SetHDRTYPE( int i )
  31. {
  32. Assert( i >= 0 && i <= 2 );
  33. m_nHDRTYPE = i;
  34. #ifdef _DEBUG
  35. m_bHDRTYPE = true;
  36. #endif
  37. }
  38. void SetHDRTYPE( bool i )
  39. {
  40. m_nHDRTYPE = i ? 1 : 0;
  41. #ifdef _DEBUG
  42. m_bHDRTYPE = true;
  43. #endif
  44. }
  45. public:
  46. particlelit_generic_ps30_Static_Index()
  47. {
  48. #ifdef _DEBUG
  49. m_bHALFLAMBERT = false;
  50. #endif // _DEBUG
  51. m_nHALFLAMBERT = 0;
  52. #ifdef _DEBUG
  53. m_bHDRTYPE = false;
  54. #endif // _DEBUG
  55. m_nHDRTYPE = 0;
  56. }
  57. int GetIndex()
  58. {
  59. // Asserts to make sure that we aren't using any skipped combinations.
  60. // Asserts to make sure that we are setting all of the combination vars.
  61. #ifdef _DEBUG
  62. bool bAllStaticVarsDefined = m_bHALFLAMBERT && m_bHDRTYPE;
  63. Assert( bAllStaticVarsDefined );
  64. #endif // _DEBUG
  65. return ( 264 * m_nHALFLAMBERT ) + ( 528 * m_nHDRTYPE ) + 0;
  66. }
  67. };
  68. #define shaderStaticTest_particlelit_generic_ps30 psh_forgot_to_set_static_HALFLAMBERT + psh_forgot_to_set_static_HDRTYPE + 0
  69. class particlelit_generic_ps30_Dynamic_Index
  70. {
  71. private:
  72. int m_nLIGHT_COMBO;
  73. #ifdef _DEBUG
  74. bool m_bLIGHT_COMBO;
  75. #endif
  76. public:
  77. void SetLIGHT_COMBO( int i )
  78. {
  79. Assert( i >= 0 && i <= 21 );
  80. m_nLIGHT_COMBO = i;
  81. #ifdef _DEBUG
  82. m_bLIGHT_COMBO = true;
  83. #endif
  84. }
  85. void SetLIGHT_COMBO( bool i )
  86. {
  87. m_nLIGHT_COMBO = i ? 1 : 0;
  88. #ifdef _DEBUG
  89. m_bLIGHT_COMBO = true;
  90. #endif
  91. }
  92. private:
  93. int m_nWRITEWATERFOGTODESTALPHA;
  94. #ifdef _DEBUG
  95. bool m_bWRITEWATERFOGTODESTALPHA;
  96. #endif
  97. public:
  98. void SetWRITEWATERFOGTODESTALPHA( int i )
  99. {
  100. Assert( i >= 0 && i <= 1 );
  101. m_nWRITEWATERFOGTODESTALPHA = i;
  102. #ifdef _DEBUG
  103. m_bWRITEWATERFOGTODESTALPHA = true;
  104. #endif
  105. }
  106. void SetWRITEWATERFOGTODESTALPHA( bool i )
  107. {
  108. m_nWRITEWATERFOGTODESTALPHA = i ? 1 : 0;
  109. #ifdef _DEBUG
  110. m_bWRITEWATERFOGTODESTALPHA = true;
  111. #endif
  112. }
  113. private:
  114. int m_nFOGTYPE;
  115. #ifdef _DEBUG
  116. bool m_bFOGTYPE;
  117. #endif
  118. public:
  119. void SetFOGTYPE( int i )
  120. {
  121. Assert( i >= 0 && i <= 2 );
  122. m_nFOGTYPE = i;
  123. #ifdef _DEBUG
  124. m_bFOGTYPE = true;
  125. #endif
  126. }
  127. void SetFOGTYPE( bool i )
  128. {
  129. m_nFOGTYPE = i ? 1 : 0;
  130. #ifdef _DEBUG
  131. m_bFOGTYPE = true;
  132. #endif
  133. }
  134. private:
  135. int m_nHDRENABLED;
  136. #ifdef _DEBUG
  137. bool m_bHDRENABLED;
  138. #endif
  139. public:
  140. void SetHDRENABLED( int i )
  141. {
  142. Assert( i >= 0 && i <= 1 );
  143. m_nHDRENABLED = i;
  144. #ifdef _DEBUG
  145. m_bHDRENABLED = true;
  146. #endif
  147. }
  148. void SetHDRENABLED( bool i )
  149. {
  150. m_nHDRENABLED = i ? 1 : 0;
  151. #ifdef _DEBUG
  152. m_bHDRENABLED = true;
  153. #endif
  154. }
  155. public:
  156. particlelit_generic_ps30_Dynamic_Index()
  157. {
  158. #ifdef _DEBUG
  159. m_bLIGHT_COMBO = false;
  160. #endif // _DEBUG
  161. m_nLIGHT_COMBO = 0;
  162. #ifdef _DEBUG
  163. m_bWRITEWATERFOGTODESTALPHA = false;
  164. #endif // _DEBUG
  165. m_nWRITEWATERFOGTODESTALPHA = 0;
  166. #ifdef _DEBUG
  167. m_bFOGTYPE = false;
  168. #endif // _DEBUG
  169. m_nFOGTYPE = 0;
  170. #ifdef _DEBUG
  171. m_bHDRENABLED = false;
  172. #endif // _DEBUG
  173. m_nHDRENABLED = 0;
  174. }
  175. int GetIndex()
  176. {
  177. // Asserts to make sure that we aren't using any skipped combinations.
  178. // Asserts to make sure that we are setting all of the combination vars.
  179. #ifdef _DEBUG
  180. bool bAllDynamicVarsDefined = m_bLIGHT_COMBO && m_bWRITEWATERFOGTODESTALPHA && m_bFOGTYPE && m_bHDRENABLED;
  181. Assert( bAllDynamicVarsDefined );
  182. #endif // _DEBUG
  183. return ( 1 * m_nLIGHT_COMBO ) + ( 22 * m_nWRITEWATERFOGTODESTALPHA ) + ( 44 * m_nFOGTYPE ) + ( 132 * m_nHDRENABLED ) + 0;
  184. }
  185. };
  186. #define shaderDynamicTest_particlelit_generic_ps30 psh_forgot_to_set_dynamic_LIGHT_COMBO + psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_FOGTYPE + psh_forgot_to_set_dynamic_HDRENABLED + 0