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.6 KiB

  1. #include "shaderlib/cshader.h"
  2. class eyes_flashlight_ps30_Static_Index
  3. {
  4. private:
  5. int m_nFLASHLIGHTDEPTHFILTERMODE;
  6. #ifdef _DEBUG
  7. bool m_bFLASHLIGHTDEPTHFILTERMODE;
  8. #endif
  9. public:
  10. void SetFLASHLIGHTDEPTHFILTERMODE( int i )
  11. {
  12. Assert( i >= 0 && i <= 2 );
  13. m_nFLASHLIGHTDEPTHFILTERMODE = i;
  14. #ifdef _DEBUG
  15. m_bFLASHLIGHTDEPTHFILTERMODE = true;
  16. #endif
  17. }
  18. void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
  19. {
  20. m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bFLASHLIGHTDEPTHFILTERMODE = true;
  23. #endif
  24. }
  25. public:
  26. eyes_flashlight_ps30_Static_Index( )
  27. {
  28. #ifdef _DEBUG
  29. m_bFLASHLIGHTDEPTHFILTERMODE = false;
  30. #endif // _DEBUG
  31. m_nFLASHLIGHTDEPTHFILTERMODE = 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_bFLASHLIGHTDEPTHFILTERMODE;
  39. Assert( bAllStaticVarsDefined );
  40. #endif // _DEBUG
  41. return ( 4 * m_nFLASHLIGHTDEPTHFILTERMODE ) + 0;
  42. }
  43. };
  44. #define shaderStaticTest_eyes_flashlight_ps30 psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + 0
  45. class eyes_flashlight_ps30_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_nFLASHLIGHTSHADOWS;
  70. #ifdef _DEBUG
  71. bool m_bFLASHLIGHTSHADOWS;
  72. #endif
  73. public:
  74. void SetFLASHLIGHTSHADOWS( int i )
  75. {
  76. Assert( i >= 0 && i <= 1 );
  77. m_nFLASHLIGHTSHADOWS = i;
  78. #ifdef _DEBUG
  79. m_bFLASHLIGHTSHADOWS = true;
  80. #endif
  81. }
  82. void SetFLASHLIGHTSHADOWS( bool i )
  83. {
  84. m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
  85. #ifdef _DEBUG
  86. m_bFLASHLIGHTSHADOWS = true;
  87. #endif
  88. }
  89. public:
  90. eyes_flashlight_ps30_Dynamic_Index()
  91. {
  92. #ifdef _DEBUG
  93. m_bPIXELFOGTYPE = false;
  94. #endif // _DEBUG
  95. m_nPIXELFOGTYPE = 0;
  96. #ifdef _DEBUG
  97. m_bFLASHLIGHTSHADOWS = false;
  98. #endif // _DEBUG
  99. m_nFLASHLIGHTSHADOWS = 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_bPIXELFOGTYPE && m_bFLASHLIGHTSHADOWS;
  107. Assert( bAllDynamicVarsDefined );
  108. #endif // _DEBUG
  109. return ( 1 * m_nPIXELFOGTYPE ) + ( 2 * m_nFLASHLIGHTSHADOWS ) + 0;
  110. }
  111. };
  112. #define shaderDynamicTest_eyes_flashlight_ps30 psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + 0