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.

172 lines
3.9 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 cloak_blended_pass_vs30_Static_Index
  5. {
  6. private:
  7. int m_nBUMPMAP;
  8. #ifdef _DEBUG
  9. bool m_bBUMPMAP;
  10. #endif
  11. public:
  12. void SetBUMPMAP( int i )
  13. {
  14. Assert( i >= 0 && i <= 1 );
  15. m_nBUMPMAP = i;
  16. #ifdef _DEBUG
  17. m_bBUMPMAP = true;
  18. #endif
  19. }
  20. void SetBUMPMAP( bool i )
  21. {
  22. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  23. m_nBUMPMAP = i ? 1 : 0;
  24. #ifdef _DEBUG
  25. m_bBUMPMAP = true;
  26. #endif
  27. }
  28. public:
  29. // CONSTRUCTOR
  30. cloak_blended_pass_vs30_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  31. {
  32. #ifdef _DEBUG
  33. m_bBUMPMAP = false;
  34. #endif // _DEBUG
  35. m_nBUMPMAP = 0;
  36. }
  37. int GetIndex()
  38. {
  39. // Asserts to make sure that we aren't using any skipped combinations.
  40. // Asserts to make sure that we are setting all of the combination vars.
  41. #ifdef _DEBUG
  42. bool bAllStaticVarsDefined = m_bBUMPMAP;
  43. Assert( bAllStaticVarsDefined );
  44. #endif // _DEBUG
  45. return ( 4 * m_nBUMPMAP ) + 0;
  46. }
  47. };
  48. #define shaderStaticTest_cloak_blended_pass_vs30 vsh_forgot_to_set_static_BUMPMAP + 0
  49. class cloak_blended_pass_vs30_Dynamic_Index
  50. {
  51. private:
  52. int m_nCOMPRESSED_VERTS;
  53. #ifdef _DEBUG
  54. bool m_bCOMPRESSED_VERTS;
  55. #endif
  56. public:
  57. void SetCOMPRESSED_VERTS( int i )
  58. {
  59. Assert( i >= 0 && i <= 1 );
  60. m_nCOMPRESSED_VERTS = i;
  61. #ifdef _DEBUG
  62. m_bCOMPRESSED_VERTS = true;
  63. #endif
  64. }
  65. void SetCOMPRESSED_VERTS( bool i )
  66. {
  67. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  68. m_nCOMPRESSED_VERTS = i ? 1 : 0;
  69. #ifdef _DEBUG
  70. m_bCOMPRESSED_VERTS = true;
  71. #endif
  72. }
  73. private:
  74. int m_nSKINNING;
  75. #ifdef _DEBUG
  76. bool m_bSKINNING;
  77. #endif
  78. public:
  79. void SetSKINNING( int i )
  80. {
  81. Assert( i >= 0 && i <= 1 );
  82. m_nSKINNING = i;
  83. #ifdef _DEBUG
  84. m_bSKINNING = true;
  85. #endif
  86. }
  87. void SetSKINNING( bool i )
  88. {
  89. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  90. m_nSKINNING = i ? 1 : 0;
  91. #ifdef _DEBUG
  92. m_bSKINNING = true;
  93. #endif
  94. }
  95. private:
  96. int m_nMORPHING;
  97. #ifdef _DEBUG
  98. bool m_bMORPHING;
  99. #endif
  100. public:
  101. void SetMORPHING( int i )
  102. {
  103. Assert( i >= 0 && i <= 0 );
  104. m_nMORPHING = i;
  105. #ifdef _DEBUG
  106. m_bMORPHING = true;
  107. #endif
  108. }
  109. void SetMORPHING( bool i )
  110. {
  111. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  112. m_nMORPHING = i ? 1 : 0;
  113. #ifdef _DEBUG
  114. m_bMORPHING = true;
  115. #endif
  116. }
  117. public:
  118. // CONSTRUCTOR
  119. cloak_blended_pass_vs30_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  120. {
  121. #ifdef _DEBUG
  122. m_bCOMPRESSED_VERTS = false;
  123. #endif // _DEBUG
  124. m_nCOMPRESSED_VERTS = 0;
  125. #ifdef _DEBUG
  126. m_bSKINNING = false;
  127. #endif // _DEBUG
  128. m_nSKINNING = 0;
  129. #ifdef _DEBUG
  130. m_bMORPHING = true;
  131. #endif // _DEBUG
  132. m_nMORPHING = false ;
  133. }
  134. int GetIndex()
  135. {
  136. // Asserts to make sure that we aren't using any skipped combinations.
  137. // Asserts to make sure that we are setting all of the combination vars.
  138. #ifdef _DEBUG
  139. bool bAllDynamicVarsDefined = m_bCOMPRESSED_VERTS && m_bSKINNING && m_bMORPHING;
  140. Assert( bAllDynamicVarsDefined );
  141. #endif // _DEBUG
  142. return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nSKINNING ) + ( 4 * m_nMORPHING ) + 0;
  143. }
  144. };
  145. #define shaderDynamicTest_cloak_blended_pass_vs30 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_SKINNING + 0
  146. static const ShaderComboInformation_t s_DynamicComboArray_cloak_blended_pass_vs30[3] =
  147. {
  148. { "COMPRESSED_VERTS", 0, 1 },
  149. { "SKINNING", 0, 1 },
  150. { "MORPHING", 0, 0 },
  151. };
  152. static const ShaderComboInformation_t s_StaticComboArray_cloak_blended_pass_vs30[1] =
  153. {
  154. { "BUMPMAP", 0, 1 },
  155. };
  156. static const ShaderComboSemantics_t cloak_blended_pass_vs30_combos =
  157. {
  158. "cloak_blended_pass_vs30", s_DynamicComboArray_cloak_blended_pass_vs30, 3, s_StaticComboArray_cloak_blended_pass_vs30, 1
  159. };
  160. class ConstructMe_cloak_blended_pass_vs30
  161. {
  162. public:
  163. ConstructMe_cloak_blended_pass_vs30()
  164. {
  165. GetShaderDLL()->AddShaderComboInformation( &cloak_blended_pass_vs30_combos );
  166. }
  167. };
  168. static ConstructMe_cloak_blended_pass_vs30 s_ConstructMe_cloak_blended_pass_vs30;