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.

253 lines
6.0 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 splinecard_vs20_Static_Index
  5. {
  6. private:
  7. int m_nADDBASETEXTURE2;
  8. #ifdef _DEBUG
  9. bool m_bADDBASETEXTURE2;
  10. #endif
  11. public:
  12. void SetADDBASETEXTURE2( int i )
  13. {
  14. Assert( i >= 0 && i <= 0 );
  15. m_nADDBASETEXTURE2 = i;
  16. #ifdef _DEBUG
  17. m_bADDBASETEXTURE2 = true;
  18. #endif
  19. }
  20. void SetADDBASETEXTURE2( bool i )
  21. {
  22. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  23. m_nADDBASETEXTURE2 = i ? 1 : 0;
  24. #ifdef _DEBUG
  25. m_bADDBASETEXTURE2 = true;
  26. #endif
  27. }
  28. private:
  29. int m_nEXTRACTGREENALPHA;
  30. #ifdef _DEBUG
  31. bool m_bEXTRACTGREENALPHA;
  32. #endif
  33. public:
  34. void SetEXTRACTGREENALPHA( int i )
  35. {
  36. Assert( i >= 0 && i <= 0 );
  37. m_nEXTRACTGREENALPHA = i;
  38. #ifdef _DEBUG
  39. m_bEXTRACTGREENALPHA = true;
  40. #endif
  41. }
  42. void SetEXTRACTGREENALPHA( bool i )
  43. {
  44. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  45. m_nEXTRACTGREENALPHA = i ? 1 : 0;
  46. #ifdef _DEBUG
  47. m_bEXTRACTGREENALPHA = true;
  48. #endif
  49. }
  50. private:
  51. int m_nDUALSEQUENCE;
  52. #ifdef _DEBUG
  53. bool m_bDUALSEQUENCE;
  54. #endif
  55. public:
  56. void SetDUALSEQUENCE( int i )
  57. {
  58. Assert( i >= 0 && i <= 0 );
  59. m_nDUALSEQUENCE = i;
  60. #ifdef _DEBUG
  61. m_bDUALSEQUENCE = true;
  62. #endif
  63. }
  64. void SetDUALSEQUENCE( bool i )
  65. {
  66. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  67. m_nDUALSEQUENCE = i ? 1 : 0;
  68. #ifdef _DEBUG
  69. m_bDUALSEQUENCE = true;
  70. #endif
  71. }
  72. private:
  73. int m_nDEPTHBLEND;
  74. #ifdef _DEBUG
  75. bool m_bDEPTHBLEND;
  76. #endif
  77. public:
  78. void SetDEPTHBLEND( int i )
  79. {
  80. Assert( i >= 0 && i <= 0 );
  81. m_nDEPTHBLEND = i;
  82. #ifdef _DEBUG
  83. m_bDEPTHBLEND = true;
  84. #endif
  85. }
  86. void SetDEPTHBLEND( bool i )
  87. {
  88. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  89. m_nDEPTHBLEND = i ? 1 : 0;
  90. #ifdef _DEBUG
  91. m_bDEPTHBLEND = true;
  92. #endif
  93. }
  94. private:
  95. int m_nPACKED_INTERPOLATOR;
  96. #ifdef _DEBUG
  97. bool m_bPACKED_INTERPOLATOR;
  98. #endif
  99. public:
  100. void SetPACKED_INTERPOLATOR( int i )
  101. {
  102. Assert( i >= 0 && i <= 0 );
  103. m_nPACKED_INTERPOLATOR = i;
  104. #ifdef _DEBUG
  105. m_bPACKED_INTERPOLATOR = true;
  106. #endif
  107. }
  108. void SetPACKED_INTERPOLATOR( bool i )
  109. {
  110. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  111. m_nPACKED_INTERPOLATOR = i ? 1 : 0;
  112. #ifdef _DEBUG
  113. m_bPACKED_INTERPOLATOR = true;
  114. #endif
  115. }
  116. private:
  117. int m_nANIMBLEND_OR_MAXLUMFRAMEBLEND1;
  118. #ifdef _DEBUG
  119. bool m_bANIMBLEND_OR_MAXLUMFRAMEBLEND1;
  120. #endif
  121. public:
  122. void SetANIMBLEND_OR_MAXLUMFRAMEBLEND1( int i )
  123. {
  124. Assert( i >= 0 && i <= 1 );
  125. m_nANIMBLEND_OR_MAXLUMFRAMEBLEND1 = i;
  126. #ifdef _DEBUG
  127. m_bANIMBLEND_OR_MAXLUMFRAMEBLEND1 = true;
  128. #endif
  129. }
  130. void SetANIMBLEND_OR_MAXLUMFRAMEBLEND1( bool i )
  131. {
  132. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  133. m_nANIMBLEND_OR_MAXLUMFRAMEBLEND1 = i ? 1 : 0;
  134. #ifdef _DEBUG
  135. m_bANIMBLEND_OR_MAXLUMFRAMEBLEND1 = true;
  136. #endif
  137. }
  138. public:
  139. // CONSTRUCTOR
  140. splinecard_vs20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  141. {
  142. #ifdef _DEBUG
  143. m_bADDBASETEXTURE2 = false;
  144. #endif // _DEBUG
  145. m_nADDBASETEXTURE2 = 0;
  146. #ifdef _DEBUG
  147. m_bEXTRACTGREENALPHA = false;
  148. #endif // _DEBUG
  149. m_nEXTRACTGREENALPHA = 0;
  150. #ifdef _DEBUG
  151. m_bDUALSEQUENCE = false;
  152. #endif // _DEBUG
  153. m_nDUALSEQUENCE = 0;
  154. #ifdef _DEBUG
  155. m_bDEPTHBLEND = false;
  156. #endif // _DEBUG
  157. m_nDEPTHBLEND = 0;
  158. #ifdef _DEBUG
  159. m_bPACKED_INTERPOLATOR = false;
  160. #endif // _DEBUG
  161. m_nPACKED_INTERPOLATOR = 0;
  162. #ifdef _DEBUG
  163. m_bANIMBLEND_OR_MAXLUMFRAMEBLEND1 = false;
  164. #endif // _DEBUG
  165. m_nANIMBLEND_OR_MAXLUMFRAMEBLEND1 = 0;
  166. }
  167. int GetIndex()
  168. {
  169. // Asserts to make sure that we aren't using any skipped combinations.
  170. // Asserts to make sure that we are setting all of the combination vars.
  171. #ifdef _DEBUG
  172. bool bAllStaticVarsDefined = m_bADDBASETEXTURE2 && m_bEXTRACTGREENALPHA && m_bDUALSEQUENCE && m_bDEPTHBLEND && m_bPACKED_INTERPOLATOR && m_bANIMBLEND_OR_MAXLUMFRAMEBLEND1;
  173. Assert( bAllStaticVarsDefined );
  174. #endif // _DEBUG
  175. return ( 4 * m_nADDBASETEXTURE2 ) + ( 4 * m_nEXTRACTGREENALPHA ) + ( 4 * m_nDUALSEQUENCE ) + ( 4 * m_nDEPTHBLEND ) + ( 4 * m_nPACKED_INTERPOLATOR ) + ( 4 * m_nANIMBLEND_OR_MAXLUMFRAMEBLEND1 ) + 0;
  176. }
  177. };
  178. #define shaderStaticTest_splinecard_vs20 vsh_forgot_to_set_static_ADDBASETEXTURE2 + vsh_forgot_to_set_static_EXTRACTGREENALPHA + vsh_forgot_to_set_static_DUALSEQUENCE + vsh_forgot_to_set_static_DEPTHBLEND + vsh_forgot_to_set_static_PACKED_INTERPOLATOR + vsh_forgot_to_set_static_ANIMBLEND_OR_MAXLUMFRAMEBLEND1 + 0
  179. class splinecard_vs20_Dynamic_Index
  180. {
  181. private:
  182. int m_nORIENTATION;
  183. #ifdef _DEBUG
  184. bool m_bORIENTATION;
  185. #endif
  186. public:
  187. void SetORIENTATION( int i )
  188. {
  189. Assert( i >= 0 && i <= 3 );
  190. m_nORIENTATION = i;
  191. #ifdef _DEBUG
  192. m_bORIENTATION = true;
  193. #endif
  194. }
  195. void SetORIENTATION( bool i )
  196. {
  197. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 3 );
  198. m_nORIENTATION = i ? 1 : 0;
  199. #ifdef _DEBUG
  200. m_bORIENTATION = true;
  201. #endif
  202. }
  203. public:
  204. // CONSTRUCTOR
  205. splinecard_vs20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  206. {
  207. #ifdef _DEBUG
  208. m_bORIENTATION = false;
  209. #endif // _DEBUG
  210. m_nORIENTATION = 0;
  211. }
  212. int GetIndex()
  213. {
  214. // Asserts to make sure that we aren't using any skipped combinations.
  215. // Asserts to make sure that we are setting all of the combination vars.
  216. #ifdef _DEBUG
  217. bool bAllDynamicVarsDefined = m_bORIENTATION;
  218. Assert( bAllDynamicVarsDefined );
  219. #endif // _DEBUG
  220. return ( 1 * m_nORIENTATION ) + 0;
  221. }
  222. };
  223. #define shaderDynamicTest_splinecard_vs20 vsh_forgot_to_set_dynamic_ORIENTATION + 0
  224. static const ShaderComboInformation_t s_DynamicComboArray_splinecard_vs20[1] =
  225. {
  226. { "ORIENTATION", 0, 3 },
  227. };
  228. static const ShaderComboInformation_t s_StaticComboArray_splinecard_vs20[6] =
  229. {
  230. { "ADDBASETEXTURE2", 0, 0 },
  231. { "EXTRACTGREENALPHA", 0, 0 },
  232. { "DUALSEQUENCE", 0, 0 },
  233. { "DEPTHBLEND", 0, 0 },
  234. { "PACKED_INTERPOLATOR", 0, 0 },
  235. { "ANIMBLEND_OR_MAXLUMFRAMEBLEND1", 0, 1 },
  236. };
  237. static const ShaderComboSemantics_t splinecard_vs20_combos =
  238. {
  239. "splinecard_vs20", s_DynamicComboArray_splinecard_vs20, 1, s_StaticComboArray_splinecard_vs20, 6
  240. };
  241. class ConstructMe_splinecard_vs20
  242. {
  243. public:
  244. ConstructMe_splinecard_vs20()
  245. {
  246. GetShaderDLL()->AddShaderComboInformation( &splinecard_vs20_combos );
  247. }
  248. };
  249. static ConstructMe_splinecard_vs20 s_ConstructMe_splinecard_vs20;