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.

120 lines
2.8 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. // ( $DOWATERFOG == 0 ) && ( $DOPIXELFOG && $HARDWAREFOGBLEND )
  3. // ( $DOWATERFOG == 0 ) && ( $HARDWAREFOGBLEND == 0 ) && ( $DOPIXELFOG == 0 )
  4. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  5. #include "shaderlib/cshader.h"
  6. class bik_vs20_Static_Index
  7. {
  8. private:
  9. int m_nDOPIXELFOG;
  10. #ifdef _DEBUG
  11. bool m_bDOPIXELFOG;
  12. #endif
  13. public:
  14. void SetDOPIXELFOG( int i )
  15. {
  16. Assert( i >= 0 && i <= 1 );
  17. m_nDOPIXELFOG = i;
  18. #ifdef _DEBUG
  19. m_bDOPIXELFOG = true;
  20. #endif
  21. }
  22. void SetDOPIXELFOG( bool i )
  23. {
  24. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  25. m_nDOPIXELFOG = i ? 1 : 0;
  26. #ifdef _DEBUG
  27. m_bDOPIXELFOG = true;
  28. #endif
  29. }
  30. public:
  31. // CONSTRUCTOR
  32. bik_vs20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  33. {
  34. #ifdef _DEBUG
  35. m_bDOPIXELFOG = true;
  36. #endif // _DEBUG
  37. m_nDOPIXELFOG = g_pHardwareConfig->SupportsPixelShaders_2_b() ;
  38. }
  39. int GetIndex()
  40. {
  41. // Asserts to make sure that we aren't using any skipped combinations.
  42. // Asserts to make sure that we are setting all of the combination vars.
  43. #ifdef _DEBUG
  44. bool bAllStaticVarsDefined = m_bDOPIXELFOG;
  45. Assert( bAllStaticVarsDefined );
  46. #endif // _DEBUG
  47. return ( 2 * m_nDOPIXELFOG ) + 0;
  48. }
  49. };
  50. #define shaderStaticTest_bik_vs20 0
  51. class bik_vs20_Dynamic_Index
  52. {
  53. private:
  54. int m_nDOWATERFOG;
  55. #ifdef _DEBUG
  56. bool m_bDOWATERFOG;
  57. #endif
  58. public:
  59. void SetDOWATERFOG( int i )
  60. {
  61. Assert( i >= 0 && i <= 1 );
  62. m_nDOWATERFOG = i;
  63. #ifdef _DEBUG
  64. m_bDOWATERFOG = true;
  65. #endif
  66. }
  67. void SetDOWATERFOG( bool i )
  68. {
  69. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  70. m_nDOWATERFOG = i ? 1 : 0;
  71. #ifdef _DEBUG
  72. m_bDOWATERFOG = true;
  73. #endif
  74. }
  75. public:
  76. // CONSTRUCTOR
  77. bik_vs20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  78. {
  79. #ifdef _DEBUG
  80. m_bDOWATERFOG = true;
  81. #endif // _DEBUG
  82. m_nDOWATERFOG = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ;
  83. }
  84. int GetIndex()
  85. {
  86. // Asserts to make sure that we aren't using any skipped combinations.
  87. // Asserts to make sure that we are setting all of the combination vars.
  88. #ifdef _DEBUG
  89. bool bAllDynamicVarsDefined = m_bDOWATERFOG;
  90. Assert( bAllDynamicVarsDefined );
  91. #endif // _DEBUG
  92. return ( 1 * m_nDOWATERFOG ) + 0;
  93. }
  94. };
  95. #define shaderDynamicTest_bik_vs20 0
  96. static const ShaderComboInformation_t s_DynamicComboArray_bik_vs20[1] =
  97. {
  98. { "DOWATERFOG", 0, 1 },
  99. };
  100. static const ShaderComboInformation_t s_StaticComboArray_bik_vs20[1] =
  101. {
  102. { "DOPIXELFOG", 0, 1 },
  103. };
  104. static const ShaderComboSemantics_t bik_vs20_combos =
  105. {
  106. "bik_vs20", s_DynamicComboArray_bik_vs20, 1, s_StaticComboArray_bik_vs20, 1
  107. };
  108. class ConstructMe_bik_vs20
  109. {
  110. public:
  111. ConstructMe_bik_vs20()
  112. {
  113. GetShaderDLL()->AddShaderComboInformation( &bik_vs20_combos );
  114. }
  115. };
  116. static ConstructMe_bik_vs20 s_ConstructMe_bik_vs20;