Counter Strike : Global Offensive Source Code
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.

145 lines
3.4 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  3. #include "shaderlib/cshader.h"
  4. class portalstaticoverlay_vs20_Static_Index
  5. {
  6. private:
  7. int m_nMODEL;
  8. #ifdef _DEBUG
  9. bool m_bMODEL;
  10. #endif
  11. public:
  12. void SetMODEL( int i )
  13. {
  14. Assert( i >= 0 && i <= 1 );
  15. m_nMODEL = i;
  16. #ifdef _DEBUG
  17. m_bMODEL = true;
  18. #endif
  19. }
  20. void SetMODEL( bool i )
  21. {
  22. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  23. m_nMODEL = i ? 1 : 0;
  24. #ifdef _DEBUG
  25. m_bMODEL = true;
  26. #endif
  27. }
  28. private:
  29. int m_nPORTALGHOSTOVERLAY;
  30. #ifdef _DEBUG
  31. bool m_bPORTALGHOSTOVERLAY;
  32. #endif
  33. public:
  34. void SetPORTALGHOSTOVERLAY( int i )
  35. {
  36. Assert( i >= 0 && i <= 2 );
  37. m_nPORTALGHOSTOVERLAY = i;
  38. #ifdef _DEBUG
  39. m_bPORTALGHOSTOVERLAY = true;
  40. #endif
  41. }
  42. void SetPORTALGHOSTOVERLAY( bool i )
  43. {
  44. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 2 );
  45. m_nPORTALGHOSTOVERLAY = i ? 1 : 0;
  46. #ifdef _DEBUG
  47. m_bPORTALGHOSTOVERLAY = true;
  48. #endif
  49. }
  50. public:
  51. // CONSTRUCTOR
  52. portalstaticoverlay_vs20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  53. {
  54. #ifdef _DEBUG
  55. m_bMODEL = false;
  56. #endif // _DEBUG
  57. m_nMODEL = 0;
  58. #ifdef _DEBUG
  59. m_bPORTALGHOSTOVERLAY = false;
  60. #endif // _DEBUG
  61. m_nPORTALGHOSTOVERLAY = 0;
  62. }
  63. int GetIndex()
  64. {
  65. // Asserts to make sure that we aren't using any skipped combinations.
  66. // Asserts to make sure that we are setting all of the combination vars.
  67. #ifdef _DEBUG
  68. bool bAllStaticVarsDefined = m_bMODEL && m_bPORTALGHOSTOVERLAY;
  69. Assert( bAllStaticVarsDefined );
  70. #endif // _DEBUG
  71. return ( 2 * m_nMODEL ) + ( 4 * m_nPORTALGHOSTOVERLAY ) + 0;
  72. }
  73. };
  74. #define shaderStaticTest_portalstaticoverlay_vs20 vsh_forgot_to_set_static_MODEL + vsh_forgot_to_set_static_PORTALGHOSTOVERLAY + 0
  75. class portalstaticoverlay_vs20_Dynamic_Index
  76. {
  77. private:
  78. int m_nSKINNING;
  79. #ifdef _DEBUG
  80. bool m_bSKINNING;
  81. #endif
  82. public:
  83. void SetSKINNING( int i )
  84. {
  85. Assert( i >= 0 && i <= 1 );
  86. m_nSKINNING = i;
  87. #ifdef _DEBUG
  88. m_bSKINNING = true;
  89. #endif
  90. }
  91. void SetSKINNING( bool i )
  92. {
  93. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  94. m_nSKINNING = i ? 1 : 0;
  95. #ifdef _DEBUG
  96. m_bSKINNING = true;
  97. #endif
  98. }
  99. public:
  100. // CONSTRUCTOR
  101. portalstaticoverlay_vs20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  102. {
  103. #ifdef _DEBUG
  104. m_bSKINNING = false;
  105. #endif // _DEBUG
  106. m_nSKINNING = 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 bAllDynamicVarsDefined = m_bSKINNING;
  114. Assert( bAllDynamicVarsDefined );
  115. #endif // _DEBUG
  116. return ( 1 * m_nSKINNING ) + 0;
  117. }
  118. };
  119. #define shaderDynamicTest_portalstaticoverlay_vs20 vsh_forgot_to_set_dynamic_SKINNING + 0
  120. static const ShaderComboInformation_t s_DynamicComboArray_portalstaticoverlay_vs20[1] =
  121. {
  122. { "SKINNING", 0, 1 },
  123. };
  124. static const ShaderComboInformation_t s_StaticComboArray_portalstaticoverlay_vs20[2] =
  125. {
  126. { "MODEL", 0, 1 },
  127. { "PORTALGHOSTOVERLAY", 0, 2 },
  128. };
  129. static const ShaderComboSemantics_t portalstaticoverlay_vs20_combos =
  130. {
  131. "portalstaticoverlay_vs20", s_DynamicComboArray_portalstaticoverlay_vs20, 1, s_StaticComboArray_portalstaticoverlay_vs20, 2
  132. };
  133. class ConstructMe_portalstaticoverlay_vs20
  134. {
  135. public:
  136. ConstructMe_portalstaticoverlay_vs20()
  137. {
  138. GetShaderDLL()->AddShaderComboInformation( &portalstaticoverlay_vs20_combos );
  139. }
  140. };
  141. static ConstructMe_portalstaticoverlay_vs20 s_ConstructMe_portalstaticoverlay_vs20;