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.

177 lines
4.6 KiB

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