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.

200 lines
4.4 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. // ( $DOWATERFOG == 0 ) && ( $DOPIXELFOG && $HARDWAREFOGBLEND )
  3. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  4. #include "shaderlib/cshader.h"
  5. class worldimposter_vs20_Static_Index
  6. {
  7. private:
  8. int m_nDOPIXELFOG;
  9. #ifdef _DEBUG
  10. bool m_bDOPIXELFOG;
  11. #endif
  12. public:
  13. void SetDOPIXELFOG( int i )
  14. {
  15. Assert( i >= 0 && i <= 0 );
  16. m_nDOPIXELFOG = i;
  17. #ifdef _DEBUG
  18. m_bDOPIXELFOG = true;
  19. #endif
  20. }
  21. void SetDOPIXELFOG( bool i )
  22. {
  23. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  24. m_nDOPIXELFOG = i ? 1 : 0;
  25. #ifdef _DEBUG
  26. m_bDOPIXELFOG = true;
  27. #endif
  28. }
  29. public:
  30. // CONSTRUCTOR
  31. worldimposter_vs20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  32. {
  33. #ifdef _DEBUG
  34. m_bDOPIXELFOG = true;
  35. #endif // _DEBUG
  36. m_nDOPIXELFOG = 0; ;
  37. }
  38. int GetIndex()
  39. {
  40. // Asserts to make sure that we aren't using any skipped combinations.
  41. // Asserts to make sure that we are setting all of the combination vars.
  42. #ifdef _DEBUG
  43. bool bAllStaticVarsDefined = m_bDOPIXELFOG;
  44. Assert( bAllStaticVarsDefined );
  45. #endif // _DEBUG
  46. return ( 8 * m_nDOPIXELFOG ) + 0;
  47. }
  48. };
  49. #define shaderStaticTest_worldimposter_vs20 0
  50. class worldimposter_vs20_Dynamic_Index
  51. {
  52. private:
  53. int m_nDOWATERFOG;
  54. #ifdef _DEBUG
  55. bool m_bDOWATERFOG;
  56. #endif
  57. public:
  58. void SetDOWATERFOG( int i )
  59. {
  60. Assert( i >= 0 && i <= 0 );
  61. m_nDOWATERFOG = i;
  62. #ifdef _DEBUG
  63. m_bDOWATERFOG = true;
  64. #endif
  65. }
  66. void SetDOWATERFOG( bool i )
  67. {
  68. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
  69. m_nDOWATERFOG = i ? 1 : 0;
  70. #ifdef _DEBUG
  71. m_bDOWATERFOG = true;
  72. #endif
  73. }
  74. private:
  75. int m_nSKINNING;
  76. #ifdef _DEBUG
  77. bool m_bSKINNING;
  78. #endif
  79. public:
  80. void SetSKINNING( int i )
  81. {
  82. Assert( i >= 0 && i <= 1 );
  83. m_nSKINNING = i;
  84. #ifdef _DEBUG
  85. m_bSKINNING = true;
  86. #endif
  87. }
  88. void SetSKINNING( bool i )
  89. {
  90. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  91. m_nSKINNING = i ? 1 : 0;
  92. #ifdef _DEBUG
  93. m_bSKINNING = true;
  94. #endif
  95. }
  96. private:
  97. int m_nCOMPRESSED_VERTS;
  98. #ifdef _DEBUG
  99. bool m_bCOMPRESSED_VERTS;
  100. #endif
  101. public:
  102. void SetCOMPRESSED_VERTS( int i )
  103. {
  104. Assert( i >= 0 && i <= 1 );
  105. m_nCOMPRESSED_VERTS = i;
  106. #ifdef _DEBUG
  107. m_bCOMPRESSED_VERTS = true;
  108. #endif
  109. }
  110. void SetCOMPRESSED_VERTS( bool i )
  111. {
  112. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  113. m_nCOMPRESSED_VERTS = i ? 1 : 0;
  114. #ifdef _DEBUG
  115. m_bCOMPRESSED_VERTS = true;
  116. #endif
  117. }
  118. private:
  119. int m_nFLASHLIGHT;
  120. #ifdef _DEBUG
  121. bool m_bFLASHLIGHT;
  122. #endif
  123. public:
  124. void SetFLASHLIGHT( int i )
  125. {
  126. Assert( i >= 0 && i <= 1 );
  127. m_nFLASHLIGHT = i;
  128. #ifdef _DEBUG
  129. m_bFLASHLIGHT = true;
  130. #endif
  131. }
  132. void SetFLASHLIGHT( bool i )
  133. {
  134. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  135. m_nFLASHLIGHT = i ? 1 : 0;
  136. #ifdef _DEBUG
  137. m_bFLASHLIGHT = true;
  138. #endif
  139. }
  140. public:
  141. // CONSTRUCTOR
  142. worldimposter_vs20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  143. {
  144. #ifdef _DEBUG
  145. m_bDOWATERFOG = true;
  146. #endif // _DEBUG
  147. m_nDOWATERFOG = 0; ;
  148. #ifdef _DEBUG
  149. m_bSKINNING = false;
  150. #endif // _DEBUG
  151. m_nSKINNING = 0;
  152. #ifdef _DEBUG
  153. m_bCOMPRESSED_VERTS = false;
  154. #endif // _DEBUG
  155. m_nCOMPRESSED_VERTS = 0;
  156. #ifdef _DEBUG
  157. m_bFLASHLIGHT = false;
  158. #endif // _DEBUG
  159. m_nFLASHLIGHT = 0;
  160. }
  161. int GetIndex()
  162. {
  163. // Asserts to make sure that we aren't using any skipped combinations.
  164. // Asserts to make sure that we are setting all of the combination vars.
  165. #ifdef _DEBUG
  166. bool bAllDynamicVarsDefined = m_bDOWATERFOG && m_bSKINNING && m_bCOMPRESSED_VERTS && m_bFLASHLIGHT;
  167. Assert( bAllDynamicVarsDefined );
  168. #endif // _DEBUG
  169. return ( 1 * m_nDOWATERFOG ) + ( 1 * m_nSKINNING ) + ( 2 * m_nCOMPRESSED_VERTS ) + ( 4 * m_nFLASHLIGHT ) + 0;
  170. }
  171. };
  172. #define shaderDynamicTest_worldimposter_vs20 vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_FLASHLIGHT + 0
  173. static const ShaderComboInformation_t s_DynamicComboArray_worldimposter_vs20[4] =
  174. {
  175. { "DOWATERFOG", 0, 0 },
  176. { "SKINNING", 0, 1 },
  177. { "COMPRESSED_VERTS", 0, 1 },
  178. { "FLASHLIGHT", 0, 1 },
  179. };
  180. static const ShaderComboInformation_t s_StaticComboArray_worldimposter_vs20[1] =
  181. {
  182. { "DOPIXELFOG", 0, 0 },
  183. };
  184. static const ShaderComboSemantics_t worldimposter_vs20_combos =
  185. {
  186. "worldimposter_vs20", s_DynamicComboArray_worldimposter_vs20, 4, s_StaticComboArray_worldimposter_vs20, 1
  187. };
  188. class ConstructMe_worldimposter_vs20
  189. {
  190. public:
  191. ConstructMe_worldimposter_vs20()
  192. {
  193. GetShaderDLL()->AddShaderComboInformation( &worldimposter_vs20_combos );
  194. }
  195. };
  196. static ConstructMe_worldimposter_vs20 s_ConstructMe_worldimposter_vs20;