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.0 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 customweapon_ps20_Static_Index
  9. {
  10. private:
  11. int m_nPAINTSTYLE;
  12. #ifdef _DEBUG
  13. bool m_bPAINTSTYLE;
  14. #endif
  15. public:
  16. void SetPAINTSTYLE( int i )
  17. {
  18. Assert( i >= 0 && i <= 4 );
  19. m_nPAINTSTYLE = i;
  20. #ifdef _DEBUG
  21. m_bPAINTSTYLE = true;
  22. #endif
  23. }
  24. void SetPAINTSTYLE( bool i )
  25. {
  26. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 4 );
  27. m_nPAINTSTYLE = i ? 1 : 0;
  28. #ifdef _DEBUG
  29. m_bPAINTSTYLE = true;
  30. #endif
  31. }
  32. private:
  33. int m_nEXPONENTMODE;
  34. #ifdef _DEBUG
  35. bool m_bEXPONENTMODE;
  36. #endif
  37. public:
  38. void SetEXPONENTMODE( int i )
  39. {
  40. Assert( i >= 0 && i <= 1 );
  41. m_nEXPONENTMODE = i;
  42. #ifdef _DEBUG
  43. m_bEXPONENTMODE = true;
  44. #endif
  45. }
  46. void SetEXPONENTMODE( bool i )
  47. {
  48. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  49. m_nEXPONENTMODE = i ? 1 : 0;
  50. #ifdef _DEBUG
  51. m_bEXPONENTMODE = true;
  52. #endif
  53. }
  54. public:
  55. // CONSTRUCTOR
  56. customweapon_ps20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  57. {
  58. #ifdef _DEBUG
  59. m_bPAINTSTYLE = false;
  60. #endif // _DEBUG
  61. m_nPAINTSTYLE = 0;
  62. #ifdef _DEBUG
  63. m_bEXPONENTMODE = false;
  64. #endif // _DEBUG
  65. m_nEXPONENTMODE = 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_bPAINTSTYLE && m_bEXPONENTMODE;
  73. Assert( bAllStaticVarsDefined );
  74. #endif // _DEBUG
  75. return ( 1 * m_nPAINTSTYLE ) + ( 5 * m_nEXPONENTMODE ) + 0;
  76. }
  77. };
  78. #define shaderStaticTest_customweapon_ps20 psh_forgot_to_set_static_PAINTSTYLE + psh_forgot_to_set_static_EXPONENTMODE + 0
  79. class customweapon_ps20_Dynamic_Index
  80. {
  81. public:
  82. // CONSTRUCTOR
  83. customweapon_ps20_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_customweapon_ps20 0
  96. static const ShaderComboInformation_t s_StaticComboArray_customweapon_ps20[2] =
  97. {
  98. { "PAINTSTYLE", 0, 4 },
  99. { "EXPONENTMODE", 0, 1 },
  100. };
  101. static const ShaderComboSemantics_t customweapon_ps20_combos =
  102. {
  103. "customweapon_ps20", NULL, 0, s_StaticComboArray_customweapon_ps20, 2
  104. };
  105. class ConstructMe_customweapon_ps20
  106. {
  107. public:
  108. ConstructMe_customweapon_ps20()
  109. {
  110. GetShaderDLL()->AddShaderComboInformation( &customweapon_ps20_combos );
  111. }
  112. };
  113. static ConstructMe_customweapon_ps20 s_ConstructMe_customweapon_ps20;