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.

137 lines
2.9 KiB

  1. #include "shaderlib/cshader.h"
  2. class cloak_ps20_Static_Index
  3. {
  4. private:
  5. int m_nLIGHTWARPTEXTURE;
  6. #ifdef _DEBUG
  7. bool m_bLIGHTWARPTEXTURE;
  8. #endif
  9. public:
  10. void SetLIGHTWARPTEXTURE( int i )
  11. {
  12. Assert( i >= 0 && i <= 1 );
  13. m_nLIGHTWARPTEXTURE = i;
  14. #ifdef _DEBUG
  15. m_bLIGHTWARPTEXTURE = true;
  16. #endif
  17. }
  18. void SetLIGHTWARPTEXTURE( bool i )
  19. {
  20. m_nLIGHTWARPTEXTURE = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bLIGHTWARPTEXTURE = true;
  23. #endif
  24. }
  25. public:
  26. cloak_ps20_Static_Index( )
  27. {
  28. #ifdef _DEBUG
  29. m_bLIGHTWARPTEXTURE = false;
  30. #endif // _DEBUG
  31. m_nLIGHTWARPTEXTURE = 0;
  32. }
  33. int GetIndex()
  34. {
  35. // Asserts to make sure that we aren't using any skipped combinations.
  36. // Asserts to make sure that we are setting all of the combination vars.
  37. #ifdef _DEBUG
  38. bool bAllStaticVarsDefined = m_bLIGHTWARPTEXTURE;
  39. Assert( bAllStaticVarsDefined );
  40. #endif // _DEBUG
  41. return ( 12 * m_nLIGHTWARPTEXTURE ) + 0;
  42. }
  43. };
  44. #define shaderStaticTest_cloak_ps20 psh_forgot_to_set_static_LIGHTWARPTEXTURE + 0
  45. class cloak_ps20_Dynamic_Index
  46. {
  47. private:
  48. int m_nPIXELFOGTYPE;
  49. #ifdef _DEBUG
  50. bool m_bPIXELFOGTYPE;
  51. #endif
  52. public:
  53. void SetPIXELFOGTYPE( int i )
  54. {
  55. Assert( i >= 0 && i <= 1 );
  56. m_nPIXELFOGTYPE = i;
  57. #ifdef _DEBUG
  58. m_bPIXELFOGTYPE = true;
  59. #endif
  60. }
  61. void SetPIXELFOGTYPE( bool i )
  62. {
  63. m_nPIXELFOGTYPE = i ? 1 : 0;
  64. #ifdef _DEBUG
  65. m_bPIXELFOGTYPE = true;
  66. #endif
  67. }
  68. private:
  69. int m_nWRITEWATERFOGTODESTALPHA;
  70. #ifdef _DEBUG
  71. bool m_bWRITEWATERFOGTODESTALPHA;
  72. #endif
  73. public:
  74. void SetWRITEWATERFOGTODESTALPHA( int i )
  75. {
  76. Assert( i >= 0 && i <= 1 );
  77. m_nWRITEWATERFOGTODESTALPHA = i;
  78. #ifdef _DEBUG
  79. m_bWRITEWATERFOGTODESTALPHA = true;
  80. #endif
  81. }
  82. void SetWRITEWATERFOGTODESTALPHA( bool i )
  83. {
  84. m_nWRITEWATERFOGTODESTALPHA = i ? 1 : 0;
  85. #ifdef _DEBUG
  86. m_bWRITEWATERFOGTODESTALPHA = true;
  87. #endif
  88. }
  89. private:
  90. int m_nNUM_LIGHTS;
  91. #ifdef _DEBUG
  92. bool m_bNUM_LIGHTS;
  93. #endif
  94. public:
  95. void SetNUM_LIGHTS( int i )
  96. {
  97. Assert( i >= 0 && i <= 2 );
  98. m_nNUM_LIGHTS = i;
  99. #ifdef _DEBUG
  100. m_bNUM_LIGHTS = true;
  101. #endif
  102. }
  103. void SetNUM_LIGHTS( bool i )
  104. {
  105. m_nNUM_LIGHTS = i ? 1 : 0;
  106. #ifdef _DEBUG
  107. m_bNUM_LIGHTS = true;
  108. #endif
  109. }
  110. public:
  111. cloak_ps20_Dynamic_Index()
  112. {
  113. #ifdef _DEBUG
  114. m_bPIXELFOGTYPE = false;
  115. #endif // _DEBUG
  116. m_nPIXELFOGTYPE = 0;
  117. #ifdef _DEBUG
  118. m_bWRITEWATERFOGTODESTALPHA = false;
  119. #endif // _DEBUG
  120. m_nWRITEWATERFOGTODESTALPHA = 0;
  121. #ifdef _DEBUG
  122. m_bNUM_LIGHTS = false;
  123. #endif // _DEBUG
  124. m_nNUM_LIGHTS = 0;
  125. }
  126. int GetIndex()
  127. {
  128. // Asserts to make sure that we aren't using any skipped combinations.
  129. // Asserts to make sure that we are setting all of the combination vars.
  130. #ifdef _DEBUG
  131. bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE && m_bWRITEWATERFOGTODESTALPHA && m_bNUM_LIGHTS;
  132. Assert( bAllDynamicVarsDefined );
  133. #endif // _DEBUG
  134. return ( 1 * m_nPIXELFOGTYPE ) + ( 2 * m_nWRITEWATERFOGTODESTALPHA ) + ( 4 * m_nNUM_LIGHTS ) + 0;
  135. }
  136. };
  137. #define shaderDynamicTest_cloak_ps20 psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_NUM_LIGHTS + 0