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.

116 lines
3.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. #include "shaderlib/cshader.h"
  8. class showz_ps20b_Static_Index
  9. {
  10. private:
  11. int m_nFLASHLIGHTDEPTHFILTERMODE;
  12. #ifdef _DEBUG
  13. bool m_bFLASHLIGHTDEPTHFILTERMODE;
  14. #endif
  15. public:
  16. void SetFLASHLIGHTDEPTHFILTERMODE( int i )
  17. {
  18. Assert( i >= 0 && i <= 3 );
  19. m_nFLASHLIGHTDEPTHFILTERMODE = i;
  20. #ifdef _DEBUG
  21. m_bFLASHLIGHTDEPTHFILTERMODE = true;
  22. #endif
  23. }
  24. void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
  25. {
  26. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 3 );
  27. m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
  28. #ifdef _DEBUG
  29. m_bFLASHLIGHTDEPTHFILTERMODE = true;
  30. #endif
  31. }
  32. private:
  33. int m_nDEPTH_IN_ALPHA;
  34. #ifdef _DEBUG
  35. bool m_bDEPTH_IN_ALPHA;
  36. #endif
  37. public:
  38. void SetDEPTH_IN_ALPHA( int i )
  39. {
  40. Assert( i >= 0 && i <= 1 );
  41. m_nDEPTH_IN_ALPHA = i;
  42. #ifdef _DEBUG
  43. m_bDEPTH_IN_ALPHA = true;
  44. #endif
  45. }
  46. void SetDEPTH_IN_ALPHA( bool i )
  47. {
  48. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  49. m_nDEPTH_IN_ALPHA = i ? 1 : 0;
  50. #ifdef _DEBUG
  51. m_bDEPTH_IN_ALPHA = true;
  52. #endif
  53. }
  54. public:
  55. // CONSTRUCTOR
  56. showz_ps20b_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  57. {
  58. #ifdef _DEBUG
  59. m_bFLASHLIGHTDEPTHFILTERMODE = false;
  60. #endif // _DEBUG
  61. m_nFLASHLIGHTDEPTHFILTERMODE = 0;
  62. #ifdef _DEBUG
  63. m_bDEPTH_IN_ALPHA = false;
  64. #endif // _DEBUG
  65. m_nDEPTH_IN_ALPHA = 0;
  66. }
  67. int GetIndex()
  68. {
  69. // Asserts to make sure that we aren't using any skipped combinations.
  70. // Asserts to make sure that we are setting all of the combination vars.
  71. #ifdef _DEBUG
  72. bool bAllStaticVarsDefined = m_bFLASHLIGHTDEPTHFILTERMODE && m_bDEPTH_IN_ALPHA;
  73. Assert( bAllStaticVarsDefined );
  74. #endif // _DEBUG
  75. return ( 1 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 4 * m_nDEPTH_IN_ALPHA ) + 0;
  76. }
  77. };
  78. #define shaderStaticTest_showz_ps20b psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_DEPTH_IN_ALPHA + 0
  79. class showz_ps20b_Dynamic_Index
  80. {
  81. public:
  82. // CONSTRUCTOR
  83. showz_ps20b_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  84. {
  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. #endif // _DEBUG
  92. return 0;
  93. }
  94. };
  95. #define shaderDynamicTest_showz_ps20b 0
  96. static const ShaderComboInformation_t s_StaticComboArray_showz_ps20b[2] =
  97. {
  98. { "FLASHLIGHTDEPTHFILTERMODE", 0, 3 },
  99. { "DEPTH_IN_ALPHA", 0, 1 },
  100. };
  101. static const ShaderComboSemantics_t showz_ps20b_combos =
  102. {
  103. "showz_ps20b", NULL, 0, s_StaticComboArray_showz_ps20b, 2
  104. };
  105. class ConstructMe_showz_ps20b
  106. {
  107. public:
  108. ConstructMe_showz_ps20b()
  109. {
  110. GetShaderDLL()->AddShaderComboInformation( &showz_ps20b_combos );
  111. }
  112. };
  113. static ConstructMe_showz_ps20b s_ConstructMe_showz_ps20b;