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.

197 lines
4.4 KiB

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