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
2.6 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  3. #include "shaderlib/cshader.h"
  4. class manifoldsurface_vs30_Static_Index
  5. {
  6. private:
  7. int m_nVERTEX_ALPHA_BIAS;
  8. #ifdef _DEBUG
  9. bool m_bVERTEX_ALPHA_BIAS;
  10. #endif
  11. public:
  12. void SetVERTEX_ALPHA_BIAS( int i )
  13. {
  14. Assert( i >= 0 && i <= 1 );
  15. m_nVERTEX_ALPHA_BIAS = i;
  16. #ifdef _DEBUG
  17. m_bVERTEX_ALPHA_BIAS = true;
  18. #endif
  19. }
  20. void SetVERTEX_ALPHA_BIAS( bool i )
  21. {
  22. m_nVERTEX_ALPHA_BIAS = i ? 1 : 0;
  23. #ifdef _DEBUG
  24. m_bVERTEX_ALPHA_BIAS = true;
  25. #endif
  26. }
  27. public:
  28. // CONSTRUCTOR
  29. manifoldsurface_vs30_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  30. {
  31. #ifdef _DEBUG
  32. m_bVERTEX_ALPHA_BIAS = false;
  33. #endif // _DEBUG
  34. m_nVERTEX_ALPHA_BIAS = 0;
  35. }
  36. int GetIndex()
  37. {
  38. // Asserts to make sure that we aren't using any skipped combinations.
  39. // Asserts to make sure that we are setting all of the combination vars.
  40. #ifdef _DEBUG
  41. bool bAllStaticVarsDefined = m_bVERTEX_ALPHA_BIAS;
  42. Assert( bAllStaticVarsDefined );
  43. #endif // _DEBUG
  44. return ( 4 * m_nVERTEX_ALPHA_BIAS ) + 0;
  45. }
  46. };
  47. #define shaderStaticTest_manifoldsurface_vs30 vsh_forgot_to_set_static_VERTEX_ALPHA_BIAS + 0
  48. class manifoldsurface_vs30_Dynamic_Index
  49. {
  50. private:
  51. int m_nCOMPRESSED_VERTS;
  52. #ifdef _DEBUG
  53. bool m_bCOMPRESSED_VERTS;
  54. #endif
  55. public:
  56. void SetCOMPRESSED_VERTS( int i )
  57. {
  58. Assert( i >= 0 && i <= 1 );
  59. m_nCOMPRESSED_VERTS = i;
  60. #ifdef _DEBUG
  61. m_bCOMPRESSED_VERTS = true;
  62. #endif
  63. }
  64. void SetCOMPRESSED_VERTS( bool i )
  65. {
  66. m_nCOMPRESSED_VERTS = i ? 1 : 0;
  67. #ifdef _DEBUG
  68. m_bCOMPRESSED_VERTS = true;
  69. #endif
  70. }
  71. private:
  72. int m_nSKINNING;
  73. #ifdef _DEBUG
  74. bool m_bSKINNING;
  75. #endif
  76. public:
  77. void SetSKINNING( int i )
  78. {
  79. Assert( i >= 0 && i <= 1 );
  80. m_nSKINNING = i;
  81. #ifdef _DEBUG
  82. m_bSKINNING = true;
  83. #endif
  84. }
  85. void SetSKINNING( bool i )
  86. {
  87. m_nSKINNING = i ? 1 : 0;
  88. #ifdef _DEBUG
  89. m_bSKINNING = true;
  90. #endif
  91. }
  92. public:
  93. // CONSTRUCTOR
  94. manifoldsurface_vs30_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  95. {
  96. #ifdef _DEBUG
  97. m_bCOMPRESSED_VERTS = false;
  98. #endif // _DEBUG
  99. m_nCOMPRESSED_VERTS = 0;
  100. #ifdef _DEBUG
  101. m_bSKINNING = false;
  102. #endif // _DEBUG
  103. m_nSKINNING = 0;
  104. }
  105. int GetIndex()
  106. {
  107. // Asserts to make sure that we aren't using any skipped combinations.
  108. // Asserts to make sure that we are setting all of the combination vars.
  109. #ifdef _DEBUG
  110. bool bAllDynamicVarsDefined = m_bCOMPRESSED_VERTS && m_bSKINNING;
  111. Assert( bAllDynamicVarsDefined );
  112. #endif // _DEBUG
  113. return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nSKINNING ) + 0;
  114. }
  115. };
  116. #define shaderDynamicTest_manifoldsurface_vs30 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_SKINNING + 0