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.

112 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 screenspaceeffect_vs20_Static_Index
  5. {
  6. private:
  7. int m_nVERTEXCOLOR;
  8. #ifdef _DEBUG
  9. bool m_bVERTEXCOLOR;
  10. #endif
  11. public:
  12. void SetVERTEXCOLOR( int i )
  13. {
  14. Assert( i >= 0 && i <= 1 );
  15. m_nVERTEXCOLOR = i;
  16. #ifdef _DEBUG
  17. m_bVERTEXCOLOR = true;
  18. #endif
  19. }
  20. void SetVERTEXCOLOR( bool i )
  21. {
  22. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  23. m_nVERTEXCOLOR = i ? 1 : 0;
  24. #ifdef _DEBUG
  25. m_bVERTEXCOLOR = true;
  26. #endif
  27. }
  28. private:
  29. int m_nTRANSFORMVERTS;
  30. #ifdef _DEBUG
  31. bool m_bTRANSFORMVERTS;
  32. #endif
  33. public:
  34. void SetTRANSFORMVERTS( int i )
  35. {
  36. Assert( i >= 0 && i <= 1 );
  37. m_nTRANSFORMVERTS = i;
  38. #ifdef _DEBUG
  39. m_bTRANSFORMVERTS = true;
  40. #endif
  41. }
  42. void SetTRANSFORMVERTS( bool i )
  43. {
  44. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  45. m_nTRANSFORMVERTS = i ? 1 : 0;
  46. #ifdef _DEBUG
  47. m_bTRANSFORMVERTS = true;
  48. #endif
  49. }
  50. public:
  51. // CONSTRUCTOR
  52. screenspaceeffect_vs20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  53. {
  54. #ifdef _DEBUG
  55. m_bVERTEXCOLOR = true;
  56. #endif // _DEBUG
  57. m_nVERTEXCOLOR = 0;
  58. #ifdef _DEBUG
  59. m_bTRANSFORMVERTS = true;
  60. #endif // _DEBUG
  61. m_nTRANSFORMVERTS = 0;
  62. }
  63. int GetIndex()
  64. {
  65. // Asserts to make sure that we aren't using any skipped combinations.
  66. // Asserts to make sure that we are setting all of the combination vars.
  67. #ifdef _DEBUG
  68. bool bAllStaticVarsDefined = m_bVERTEXCOLOR && m_bTRANSFORMVERTS;
  69. Assert( bAllStaticVarsDefined );
  70. #endif // _DEBUG
  71. return ( 1 * m_nVERTEXCOLOR ) + ( 2 * m_nTRANSFORMVERTS ) + 0;
  72. }
  73. };
  74. #define shaderStaticTest_screenspaceeffect_vs20 0
  75. class screenspaceeffect_vs20_Dynamic_Index
  76. {
  77. public:
  78. // CONSTRUCTOR
  79. screenspaceeffect_vs20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  80. {
  81. }
  82. int GetIndex()
  83. {
  84. // Asserts to make sure that we aren't using any skipped combinations.
  85. // Asserts to make sure that we are setting all of the combination vars.
  86. #ifdef _DEBUG
  87. #endif // _DEBUG
  88. return 0;
  89. }
  90. };
  91. #define shaderDynamicTest_screenspaceeffect_vs20 0
  92. static const ShaderComboInformation_t s_StaticComboArray_screenspaceeffect_vs20[2] =
  93. {
  94. { "VERTEXCOLOR", 0, 1 },
  95. { "TRANSFORMVERTS", 0, 1 },
  96. };
  97. static const ShaderComboSemantics_t screenspaceeffect_vs20_combos =
  98. {
  99. "screenspaceeffect_vs20", NULL, 0, s_StaticComboArray_screenspaceeffect_vs20, 2
  100. };
  101. class ConstructMe_screenspaceeffect_vs20
  102. {
  103. public:
  104. ConstructMe_screenspaceeffect_vs20()
  105. {
  106. GetShaderDLL()->AddShaderComboInformation( &screenspaceeffect_vs20_combos );
  107. }
  108. };
  109. static ConstructMe_screenspaceeffect_vs20 s_ConstructMe_screenspaceeffect_vs20;