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.

144 lines
3.7 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_ps20_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_ps20_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_ps20 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_ps20_Dynamic_Index
  107. {
  108. public:
  109. // CONSTRUCTOR
  110. downsample_nohdr_ps20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  111. {
  112. }
  113. int GetIndex()
  114. {
  115. // Asserts to make sure that we aren't using any skipped combinations.
  116. // Asserts to make sure that we are setting all of the combination vars.
  117. #ifdef _DEBUG
  118. #endif // _DEBUG
  119. return 0;
  120. }
  121. };
  122. #define shaderDynamicTest_downsample_nohdr_ps20 0
  123. static const ShaderComboInformation_t s_StaticComboArray_Downsample_nohdr_ps20[3] =
  124. {
  125. { "BLOOMTYPE", 0, 1 },
  126. { "PS3REGCOUNT48", 0, 0 },
  127. { "SRGB_INPUT_ADAPTER", 0, 0 },
  128. };
  129. static const ShaderComboSemantics_t Downsample_nohdr_ps20_combos =
  130. {
  131. "Downsample_nohdr_ps20", NULL, 0, s_StaticComboArray_Downsample_nohdr_ps20, 3
  132. };
  133. class ConstructMe_Downsample_nohdr_ps20
  134. {
  135. public:
  136. ConstructMe_Downsample_nohdr_ps20()
  137. {
  138. GetShaderDLL()->AddShaderComboInformation( &Downsample_nohdr_ps20_combos );
  139. }
  140. };
  141. static ConstructMe_Downsample_nohdr_ps20 s_ConstructMe_Downsample_nohdr_ps20;