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.

110 lines
2.2 KiB

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