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.

117 lines
3.1 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. public:
  56. // CONSTRUCTOR
  57. downsample_nohdr_ps20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  58. {
  59. #ifdef _DEBUG
  60. m_bBLOOMTYPE = false;
  61. #endif // _DEBUG
  62. m_nBLOOMTYPE = 0;
  63. #ifdef _DEBUG
  64. m_bPS3REGCOUNT48 = false;
  65. #endif // _DEBUG
  66. m_nPS3REGCOUNT48 = 0;
  67. }
  68. int GetIndex()
  69. {
  70. // Asserts to make sure that we aren't using any skipped combinations.
  71. // Asserts to make sure that we are setting all of the combination vars.
  72. #ifdef _DEBUG
  73. bool bAllStaticVarsDefined = m_bBLOOMTYPE && m_bPS3REGCOUNT48;
  74. Assert( bAllStaticVarsDefined );
  75. #endif // _DEBUG
  76. return ( 1 * m_nBLOOMTYPE ) + ( 2 * m_nPS3REGCOUNT48 ) + 0;
  77. }
  78. };
  79. #define shaderStaticTest_downsample_nohdr_ps20 psh_forgot_to_set_static_BLOOMTYPE + psh_forgot_to_set_static_PS3REGCOUNT48 + 0
  80. class downsample_nohdr_ps20_Dynamic_Index
  81. {
  82. public:
  83. // CONSTRUCTOR
  84. downsample_nohdr_ps20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  85. {
  86. }
  87. int GetIndex()
  88. {
  89. // Asserts to make sure that we aren't using any skipped combinations.
  90. // Asserts to make sure that we are setting all of the combination vars.
  91. #ifdef _DEBUG
  92. #endif // _DEBUG
  93. return 0;
  94. }
  95. };
  96. #define shaderDynamicTest_downsample_nohdr_ps20 0
  97. static const ShaderComboInformation_t s_StaticComboArray_Downsample_nohdr_ps20[2] =
  98. {
  99. { "BLOOMTYPE", 0, 1 },
  100. { "PS3REGCOUNT48", 0, 0 },
  101. };
  102. static const ShaderComboSemantics_t Downsample_nohdr_ps20_combos =
  103. {
  104. "Downsample_nohdr_ps20", NULL, 0, s_StaticComboArray_Downsample_nohdr_ps20, 2
  105. };
  106. class ConstructMe_Downsample_nohdr_ps20
  107. {
  108. public:
  109. ConstructMe_Downsample_nohdr_ps20()
  110. {
  111. GetShaderDLL()->AddShaderComboInformation( &Downsample_nohdr_ps20_combos );
  112. }
  113. };
  114. static ConstructMe_Downsample_nohdr_ps20 s_ConstructMe_Downsample_nohdr_ps20;