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.

122 lines
3.2 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. #include "shaderlib/cshader.h"
  8. class particlesphere_ps20b_Static_Index
  9. {
  10. private:
  11. int m_nDEPTHBLEND;
  12. #ifdef _DEBUG
  13. bool m_bDEPTHBLEND;
  14. #endif
  15. public:
  16. void SetDEPTHBLEND( int i )
  17. {
  18. Assert( i >= 0 && i <= 1 );
  19. m_nDEPTHBLEND = i;
  20. #ifdef _DEBUG
  21. m_bDEPTHBLEND = true;
  22. #endif
  23. }
  24. void SetDEPTHBLEND( bool i )
  25. {
  26. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  27. m_nDEPTHBLEND = i ? 1 : 0;
  28. #ifdef _DEBUG
  29. m_bDEPTHBLEND = true;
  30. #endif
  31. }
  32. public:
  33. // CONSTRUCTOR
  34. particlesphere_ps20b_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  35. {
  36. #ifdef _DEBUG
  37. m_bDEPTHBLEND = false;
  38. #endif // _DEBUG
  39. m_nDEPTHBLEND = 0;
  40. }
  41. int GetIndex()
  42. {
  43. // Asserts to make sure that we aren't using any skipped combinations.
  44. // Asserts to make sure that we are setting all of the combination vars.
  45. #ifdef _DEBUG
  46. bool bAllStaticVarsDefined = m_bDEPTHBLEND;
  47. Assert( bAllStaticVarsDefined );
  48. #endif // _DEBUG
  49. return ( 2 * m_nDEPTHBLEND ) + 0;
  50. }
  51. };
  52. #define shaderStaticTest_particlesphere_ps20b psh_forgot_to_set_static_DEPTHBLEND + 0
  53. class particlesphere_ps20b_Dynamic_Index
  54. {
  55. private:
  56. int m_nPIXELFOGTYPE;
  57. #ifdef _DEBUG
  58. bool m_bPIXELFOGTYPE;
  59. #endif
  60. public:
  61. void SetPIXELFOGTYPE( int i )
  62. {
  63. Assert( i >= 0 && i <= 1 );
  64. m_nPIXELFOGTYPE = i;
  65. #ifdef _DEBUG
  66. m_bPIXELFOGTYPE = true;
  67. #endif
  68. }
  69. void SetPIXELFOGTYPE( bool i )
  70. {
  71. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  72. m_nPIXELFOGTYPE = i ? 1 : 0;
  73. #ifdef _DEBUG
  74. m_bPIXELFOGTYPE = true;
  75. #endif
  76. }
  77. public:
  78. // CONSTRUCTOR
  79. particlesphere_ps20b_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  80. {
  81. #ifdef _DEBUG
  82. m_bPIXELFOGTYPE = true;
  83. #endif // _DEBUG
  84. m_nPIXELFOGTYPE = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ;
  85. }
  86. int GetIndex()
  87. {
  88. // Asserts to make sure that we aren't using any skipped combinations.
  89. // Asserts to make sure that we are setting all of the combination vars.
  90. #ifdef _DEBUG
  91. bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE;
  92. Assert( bAllDynamicVarsDefined );
  93. #endif // _DEBUG
  94. return ( 1 * m_nPIXELFOGTYPE ) + 0;
  95. }
  96. };
  97. #define shaderDynamicTest_particlesphere_ps20b 0
  98. static const ShaderComboInformation_t s_DynamicComboArray_particlesphere_ps20b[1] =
  99. {
  100. { "PIXELFOGTYPE", 0, 1 },
  101. };
  102. static const ShaderComboInformation_t s_StaticComboArray_particlesphere_ps20b[1] =
  103. {
  104. { "DEPTHBLEND", 0, 1 },
  105. };
  106. static const ShaderComboSemantics_t particlesphere_ps20b_combos =
  107. {
  108. "particlesphere_ps20b", s_DynamicComboArray_particlesphere_ps20b, 1, s_StaticComboArray_particlesphere_ps20b, 1
  109. };
  110. class ConstructMe_particlesphere_ps20b
  111. {
  112. public:
  113. ConstructMe_particlesphere_ps20b()
  114. {
  115. GetShaderDLL()->AddShaderComboInformation( &particlesphere_ps20b_combos );
  116. }
  117. };
  118. static ConstructMe_particlesphere_ps20b s_ConstructMe_particlesphere_ps20b;