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.

173 lines
4.1 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. #include "shaderlib/cshader.h"
  13. class deferred_simple_light_ps20_Static_Index
  14. {
  15. public:
  16. // CONSTRUCTOR
  17. deferred_simple_light_ps20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  18. {
  19. }
  20. int GetIndex()
  21. {
  22. // Asserts to make sure that we aren't using any skipped combinations.
  23. // Asserts to make sure that we are setting all of the combination vars.
  24. #ifdef _DEBUG
  25. #endif // _DEBUG
  26. return 0;
  27. }
  28. };
  29. #define shaderStaticTest_deferred_simple_light_ps20 0
  30. class deferred_simple_light_ps20_Dynamic_Index
  31. {
  32. private:
  33. int m_nSPOT;
  34. #ifdef _DEBUG
  35. bool m_bSPOT;
  36. #endif
  37. public:
  38. void SetSPOT( int i )
  39. {
  40. Assert( i >= 0 && i <= 1 );
  41. m_nSPOT = i;
  42. #ifdef _DEBUG
  43. m_bSPOT = true;
  44. #endif
  45. }
  46. void SetSPOT( bool i )
  47. {
  48. m_nSPOT = i ? 1 : 0;
  49. #ifdef _DEBUG
  50. m_bSPOT = true;
  51. #endif
  52. }
  53. private:
  54. int m_nPROJECTION;
  55. #ifdef _DEBUG
  56. bool m_bPROJECTION;
  57. #endif
  58. public:
  59. void SetPROJECTION( int i )
  60. {
  61. Assert( i >= 0 && i <= 1 );
  62. m_nPROJECTION = i;
  63. #ifdef _DEBUG
  64. m_bPROJECTION = true;
  65. #endif
  66. }
  67. void SetPROJECTION( bool i )
  68. {
  69. m_nPROJECTION = i ? 1 : 0;
  70. #ifdef _DEBUG
  71. m_bPROJECTION = true;
  72. #endif
  73. }
  74. private:
  75. int m_nROTATION;
  76. #ifdef _DEBUG
  77. bool m_bROTATION;
  78. #endif
  79. public:
  80. void SetROTATION( int i )
  81. {
  82. Assert( i >= 0 && i <= 1 );
  83. m_nROTATION = i;
  84. #ifdef _DEBUG
  85. m_bROTATION = true;
  86. #endif
  87. }
  88. void SetROTATION( bool i )
  89. {
  90. m_nROTATION = i ? 1 : 0;
  91. #ifdef _DEBUG
  92. m_bROTATION = true;
  93. #endif
  94. }
  95. private:
  96. int m_nALPHA_FALLOFF;
  97. #ifdef _DEBUG
  98. bool m_bALPHA_FALLOFF;
  99. #endif
  100. public:
  101. void SetALPHA_FALLOFF( int i )
  102. {
  103. Assert( i >= 0 && i <= 1 );
  104. m_nALPHA_FALLOFF = i;
  105. #ifdef _DEBUG
  106. m_bALPHA_FALLOFF = true;
  107. #endif
  108. }
  109. void SetALPHA_FALLOFF( bool i )
  110. {
  111. m_nALPHA_FALLOFF = i ? 1 : 0;
  112. #ifdef _DEBUG
  113. m_bALPHA_FALLOFF = true;
  114. #endif
  115. }
  116. private:
  117. int m_nDEBUG;
  118. #ifdef _DEBUG
  119. bool m_bDEBUG;
  120. #endif
  121. public:
  122. void SetDEBUG( int i )
  123. {
  124. Assert( i >= 0 && i <= 1 );
  125. m_nDEBUG = i;
  126. #ifdef _DEBUG
  127. m_bDEBUG = true;
  128. #endif
  129. }
  130. void SetDEBUG( bool i )
  131. {
  132. m_nDEBUG = i ? 1 : 0;
  133. #ifdef _DEBUG
  134. m_bDEBUG = true;
  135. #endif
  136. }
  137. public:
  138. // CONSTRUCTOR
  139. deferred_simple_light_ps20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  140. {
  141. #ifdef _DEBUG
  142. m_bSPOT = false;
  143. #endif // _DEBUG
  144. m_nSPOT = 0;
  145. #ifdef _DEBUG
  146. m_bPROJECTION = false;
  147. #endif // _DEBUG
  148. m_nPROJECTION = 0;
  149. #ifdef _DEBUG
  150. m_bROTATION = false;
  151. #endif // _DEBUG
  152. m_nROTATION = 0;
  153. #ifdef _DEBUG
  154. m_bALPHA_FALLOFF = false;
  155. #endif // _DEBUG
  156. m_nALPHA_FALLOFF = 0;
  157. #ifdef _DEBUG
  158. m_bDEBUG = false;
  159. #endif // _DEBUG
  160. m_nDEBUG = 0;
  161. }
  162. int GetIndex()
  163. {
  164. // Asserts to make sure that we aren't using any skipped combinations.
  165. // Asserts to make sure that we are setting all of the combination vars.
  166. #ifdef _DEBUG
  167. bool bAllDynamicVarsDefined = m_bSPOT && m_bPROJECTION && m_bROTATION && m_bALPHA_FALLOFF && m_bDEBUG;
  168. Assert( bAllDynamicVarsDefined );
  169. #endif // _DEBUG
  170. return ( 1 * m_nSPOT ) + ( 2 * m_nPROJECTION ) + ( 4 * m_nROTATION ) + ( 8 * m_nALPHA_FALLOFF ) + ( 16 * m_nDEBUG ) + 0;
  171. }
  172. };
  173. #define shaderDynamicTest_deferred_simple_light_ps20 psh_forgot_to_set_dynamic_SPOT + psh_forgot_to_set_dynamic_PROJECTION + psh_forgot_to_set_dynamic_ROTATION + psh_forgot_to_set_dynamic_ALPHA_FALLOFF + psh_forgot_to_set_dynamic_DEBUG + 0