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.

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