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.

180 lines
5.0 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. // defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
  3. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPTINT && $LIGHTING_PREVIEW && $FASTPATHENVMAPTINT
  4. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPCONTRAST && $LIGHTING_PREVIEW && $FASTPATHENVMAPCONTRAST
  5. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  6. // ($FLASHLIGHT || $FLASHLIGHTSHADOWS) && $LIGHTING_PREVIEW
  7. // defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
  8. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPTINT && $LIGHTING_PREVIEW && $FASTPATHENVMAPTINT
  9. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPCONTRAST && $LIGHTING_PREVIEW && $FASTPATHENVMAPCONTRAST
  10. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  11. // ($FLASHLIGHT || $FLASHLIGHTSHADOWS) && $LIGHTING_PREVIEW
  12. // defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
  13. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPTINT && $LIGHTING_PREVIEW && $FASTPATHENVMAPTINT
  14. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPCONTRAST && $LIGHTING_PREVIEW && $FASTPATHENVMAPCONTRAST
  15. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  16. // ($FLASHLIGHT || $FLASHLIGHTSHADOWS) && $LIGHTING_PREVIEW
  17. #include "shaderlib/cshader.h"
  18. class blob_arm_ps20b_Static_Index
  19. {
  20. private:
  21. int m_nSELF_ILLUM_FRESNEL;
  22. #ifdef _DEBUG
  23. bool m_bSELF_ILLUM_FRESNEL;
  24. #endif
  25. public:
  26. void SetSELF_ILLUM_FRESNEL( int i )
  27. {
  28. Assert( i >= 0 && i <= 1 );
  29. m_nSELF_ILLUM_FRESNEL = i;
  30. #ifdef _DEBUG
  31. m_bSELF_ILLUM_FRESNEL = true;
  32. #endif
  33. }
  34. void SetSELF_ILLUM_FRESNEL( bool i )
  35. {
  36. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  37. m_nSELF_ILLUM_FRESNEL = i ? 1 : 0;
  38. #ifdef _DEBUG
  39. m_bSELF_ILLUM_FRESNEL = true;
  40. #endif
  41. }
  42. private:
  43. int m_nPRE_PASS;
  44. #ifdef _DEBUG
  45. bool m_bPRE_PASS;
  46. #endif
  47. public:
  48. void SetPRE_PASS( int i )
  49. {
  50. Assert( i >= 0 && i <= 1 );
  51. m_nPRE_PASS = i;
  52. #ifdef _DEBUG
  53. m_bPRE_PASS = true;
  54. #endif
  55. }
  56. void SetPRE_PASS( bool i )
  57. {
  58. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  59. m_nPRE_PASS = i ? 1 : 0;
  60. #ifdef _DEBUG
  61. m_bPRE_PASS = true;
  62. #endif
  63. }
  64. private:
  65. int m_nNORMALMAP;
  66. #ifdef _DEBUG
  67. bool m_bNORMALMAP;
  68. #endif
  69. public:
  70. void SetNORMALMAP( int i )
  71. {
  72. Assert( i >= 0 && i <= 1 );
  73. m_nNORMALMAP = i;
  74. #ifdef _DEBUG
  75. m_bNORMALMAP = true;
  76. #endif
  77. }
  78. void SetNORMALMAP( bool i )
  79. {
  80. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  81. m_nNORMALMAP = i ? 1 : 0;
  82. #ifdef _DEBUG
  83. m_bNORMALMAP = true;
  84. #endif
  85. }
  86. private:
  87. int m_nMOVING_PULSES;
  88. #ifdef _DEBUG
  89. bool m_bMOVING_PULSES;
  90. #endif
  91. public:
  92. void SetMOVING_PULSES( int i )
  93. {
  94. Assert( i >= 0 && i <= 1 );
  95. m_nMOVING_PULSES = i;
  96. #ifdef _DEBUG
  97. m_bMOVING_PULSES = true;
  98. #endif
  99. }
  100. void SetMOVING_PULSES( bool i )
  101. {
  102. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  103. m_nMOVING_PULSES = i ? 1 : 0;
  104. #ifdef _DEBUG
  105. m_bMOVING_PULSES = true;
  106. #endif
  107. }
  108. public:
  109. // CONSTRUCTOR
  110. blob_arm_ps20b_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  111. {
  112. #ifdef _DEBUG
  113. m_bSELF_ILLUM_FRESNEL = false;
  114. #endif // _DEBUG
  115. m_nSELF_ILLUM_FRESNEL = 0;
  116. #ifdef _DEBUG
  117. m_bPRE_PASS = false;
  118. #endif // _DEBUG
  119. m_nPRE_PASS = 0;
  120. #ifdef _DEBUG
  121. m_bNORMALMAP = false;
  122. #endif // _DEBUG
  123. m_nNORMALMAP = 0;
  124. #ifdef _DEBUG
  125. m_bMOVING_PULSES = false;
  126. #endif // _DEBUG
  127. m_nMOVING_PULSES = 0;
  128. }
  129. int GetIndex()
  130. {
  131. // Asserts to make sure that we aren't using any skipped combinations.
  132. // Asserts to make sure that we are setting all of the combination vars.
  133. #ifdef _DEBUG
  134. bool bAllStaticVarsDefined = m_bSELF_ILLUM_FRESNEL && m_bPRE_PASS && m_bNORMALMAP && m_bMOVING_PULSES;
  135. Assert( bAllStaticVarsDefined );
  136. #endif // _DEBUG
  137. return ( 1 * m_nSELF_ILLUM_FRESNEL ) + ( 2 * m_nPRE_PASS ) + ( 4 * m_nNORMALMAP ) + ( 8 * m_nMOVING_PULSES ) + 0;
  138. }
  139. };
  140. #define shaderStaticTest_blob_arm_ps20b psh_forgot_to_set_static_SELF_ILLUM_FRESNEL + psh_forgot_to_set_static_PRE_PASS + psh_forgot_to_set_static_NORMALMAP + psh_forgot_to_set_static_MOVING_PULSES + 0
  141. class blob_arm_ps20b_Dynamic_Index
  142. {
  143. public:
  144. // CONSTRUCTOR
  145. blob_arm_ps20b_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  146. {
  147. }
  148. int GetIndex()
  149. {
  150. // Asserts to make sure that we aren't using any skipped combinations.
  151. // Asserts to make sure that we are setting all of the combination vars.
  152. #ifdef _DEBUG
  153. #endif // _DEBUG
  154. return 0;
  155. }
  156. };
  157. #define shaderDynamicTest_blob_arm_ps20b 0
  158. static const ShaderComboInformation_t s_StaticComboArray_blob_arm_ps20b[4] =
  159. {
  160. { "SELF_ILLUM_FRESNEL", 0, 1 },
  161. { "PRE_PASS", 0, 1 },
  162. { "NORMALMAP", 0, 1 },
  163. { "MOVING_PULSES", 0, 1 },
  164. };
  165. static const ShaderComboSemantics_t blob_arm_ps20b_combos =
  166. {
  167. "blob_arm_ps20b", NULL, 0, s_StaticComboArray_blob_arm_ps20b, 4
  168. };
  169. class ConstructMe_blob_arm_ps20b
  170. {
  171. public:
  172. ConstructMe_blob_arm_ps20b()
  173. {
  174. GetShaderDLL()->AddShaderComboInformation( &blob_arm_ps20b_combos );
  175. }
  176. };
  177. static ConstructMe_blob_arm_ps20b s_ConstructMe_blob_arm_ps20b;