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.

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