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.

162 lines
3.3 KiB

  1. #include "shaderlib/cshader.h"
  2. class lightmappedgeneric_flashlight_vs20_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 <= 1 );
  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_nWORLDVERTEXTRANSITION;
  27. #ifdef _DEBUG
  28. bool m_bWORLDVERTEXTRANSITION;
  29. #endif
  30. public:
  31. void SetWORLDVERTEXTRANSITION( int i )
  32. {
  33. Assert( i >= 0 && i <= 1 );
  34. m_nWORLDVERTEXTRANSITION = i;
  35. #ifdef _DEBUG
  36. m_bWORLDVERTEXTRANSITION = true;
  37. #endif
  38. }
  39. void SetWORLDVERTEXTRANSITION( bool i )
  40. {
  41. m_nWORLDVERTEXTRANSITION = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bWORLDVERTEXTRANSITION = true;
  44. #endif
  45. }
  46. private:
  47. int m_nSEAMLESS;
  48. #ifdef _DEBUG
  49. bool m_bSEAMLESS;
  50. #endif
  51. public:
  52. void SetSEAMLESS( int i )
  53. {
  54. Assert( i >= 0 && i <= 1 );
  55. m_nSEAMLESS = i;
  56. #ifdef _DEBUG
  57. m_bSEAMLESS = true;
  58. #endif
  59. }
  60. void SetSEAMLESS( bool i )
  61. {
  62. m_nSEAMLESS = i ? 1 : 0;
  63. #ifdef _DEBUG
  64. m_bSEAMLESS = true;
  65. #endif
  66. }
  67. private:
  68. int m_nDETAIL;
  69. #ifdef _DEBUG
  70. bool m_bDETAIL;
  71. #endif
  72. public:
  73. void SetDETAIL( int i )
  74. {
  75. Assert( i >= 0 && i <= 1 );
  76. m_nDETAIL = i;
  77. #ifdef _DEBUG
  78. m_bDETAIL = true;
  79. #endif
  80. }
  81. void SetDETAIL( bool i )
  82. {
  83. m_nDETAIL = i ? 1 : 0;
  84. #ifdef _DEBUG
  85. m_bDETAIL = true;
  86. #endif
  87. }
  88. public:
  89. lightmappedgeneric_flashlight_vs20_Static_Index( )
  90. {
  91. #ifdef _DEBUG
  92. m_bNORMALMAP = false;
  93. #endif // _DEBUG
  94. m_nNORMALMAP = 0;
  95. #ifdef _DEBUG
  96. m_bWORLDVERTEXTRANSITION = false;
  97. #endif // _DEBUG
  98. m_nWORLDVERTEXTRANSITION = 0;
  99. #ifdef _DEBUG
  100. m_bSEAMLESS = false;
  101. #endif // _DEBUG
  102. m_nSEAMLESS = 0;
  103. #ifdef _DEBUG
  104. m_bDETAIL = false;
  105. #endif // _DEBUG
  106. m_nDETAIL = 0;
  107. }
  108. int GetIndex()
  109. {
  110. // Asserts to make sure that we aren't using any skipped combinations.
  111. // Asserts to make sure that we are setting all of the combination vars.
  112. #ifdef _DEBUG
  113. bool bAllStaticVarsDefined = m_bNORMALMAP && m_bWORLDVERTEXTRANSITION && m_bSEAMLESS && m_bDETAIL;
  114. Assert( bAllStaticVarsDefined );
  115. #endif // _DEBUG
  116. return ( 2 * m_nNORMALMAP ) + ( 4 * m_nWORLDVERTEXTRANSITION ) + ( 8 * m_nSEAMLESS ) + ( 16 * m_nDETAIL ) + 0;
  117. }
  118. };
  119. #define shaderStaticTest_lightmappedgeneric_flashlight_vs20 vsh_forgot_to_set_static_NORMALMAP + vsh_forgot_to_set_static_WORLDVERTEXTRANSITION + vsh_forgot_to_set_static_SEAMLESS + vsh_forgot_to_set_static_DETAIL + 0
  120. class lightmappedgeneric_flashlight_vs20_Dynamic_Index
  121. {
  122. private:
  123. int m_nDOWATERFOG;
  124. #ifdef _DEBUG
  125. bool m_bDOWATERFOG;
  126. #endif
  127. public:
  128. void SetDOWATERFOG( int i )
  129. {
  130. Assert( i >= 0 && i <= 1 );
  131. m_nDOWATERFOG = i;
  132. #ifdef _DEBUG
  133. m_bDOWATERFOG = true;
  134. #endif
  135. }
  136. void SetDOWATERFOG( bool i )
  137. {
  138. m_nDOWATERFOG = i ? 1 : 0;
  139. #ifdef _DEBUG
  140. m_bDOWATERFOG = true;
  141. #endif
  142. }
  143. public:
  144. lightmappedgeneric_flashlight_vs20_Dynamic_Index()
  145. {
  146. #ifdef _DEBUG
  147. m_bDOWATERFOG = false;
  148. #endif // _DEBUG
  149. m_nDOWATERFOG = 0;
  150. }
  151. int GetIndex()
  152. {
  153. // Asserts to make sure that we aren't using any skipped combinations.
  154. // Asserts to make sure that we are setting all of the combination vars.
  155. #ifdef _DEBUG
  156. bool bAllDynamicVarsDefined = m_bDOWATERFOG;
  157. Assert( bAllDynamicVarsDefined );
  158. #endif // _DEBUG
  159. return ( 1 * m_nDOWATERFOG ) + 0;
  160. }
  161. };
  162. #define shaderDynamicTest_lightmappedgeneric_flashlight_vs20 vsh_forgot_to_set_dynamic_DOWATERFOG + 0