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.

112 lines
2.3 KiB

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