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.

143 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. #include "shaderlib/cshader.h"
  8. class teeth_bump_ps20_Static_Index
  9. {
  10. public:
  11. // CONSTRUCTOR
  12. teeth_bump_ps20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  13. {
  14. }
  15. int GetIndex()
  16. {
  17. // Asserts to make sure that we aren't using any skipped combinations.
  18. // Asserts to make sure that we are setting all of the combination vars.
  19. #ifdef _DEBUG
  20. #endif // _DEBUG
  21. return 0;
  22. }
  23. };
  24. #define shaderStaticTest_teeth_bump_ps20 0
  25. class teeth_bump_ps20_Dynamic_Index
  26. {
  27. private:
  28. int m_nPIXELFOGTYPE;
  29. #ifdef _DEBUG
  30. bool m_bPIXELFOGTYPE;
  31. #endif
  32. public:
  33. void SetPIXELFOGTYPE( int i )
  34. {
  35. Assert( i >= 0 && i <= 1 );
  36. m_nPIXELFOGTYPE = i;
  37. #ifdef _DEBUG
  38. m_bPIXELFOGTYPE = true;
  39. #endif
  40. }
  41. void SetPIXELFOGTYPE( bool i )
  42. {
  43. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  44. m_nPIXELFOGTYPE = i ? 1 : 0;
  45. #ifdef _DEBUG
  46. m_bPIXELFOGTYPE = true;
  47. #endif
  48. }
  49. private:
  50. int m_nNUM_LIGHTS;
  51. #ifdef _DEBUG
  52. bool m_bNUM_LIGHTS;
  53. #endif
  54. public:
  55. void SetNUM_LIGHTS( int i )
  56. {
  57. Assert( i >= 0 && i <= 2 );
  58. m_nNUM_LIGHTS = i;
  59. #ifdef _DEBUG
  60. m_bNUM_LIGHTS = true;
  61. #endif
  62. }
  63. void SetNUM_LIGHTS( bool i )
  64. {
  65. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 2 );
  66. m_nNUM_LIGHTS = i ? 1 : 0;
  67. #ifdef _DEBUG
  68. m_bNUM_LIGHTS = true;
  69. #endif
  70. }
  71. private:
  72. int m_nAMBIENT_LIGHT;
  73. #ifdef _DEBUG
  74. bool m_bAMBIENT_LIGHT;
  75. #endif
  76. public:
  77. void SetAMBIENT_LIGHT( int i )
  78. {
  79. Assert( i >= 0 && i <= 1 );
  80. m_nAMBIENT_LIGHT = i;
  81. #ifdef _DEBUG
  82. m_bAMBIENT_LIGHT = true;
  83. #endif
  84. }
  85. void SetAMBIENT_LIGHT( bool i )
  86. {
  87. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  88. m_nAMBIENT_LIGHT = i ? 1 : 0;
  89. #ifdef _DEBUG
  90. m_bAMBIENT_LIGHT = true;
  91. #endif
  92. }
  93. public:
  94. // CONSTRUCTOR
  95. teeth_bump_ps20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  96. {
  97. #ifdef _DEBUG
  98. m_bPIXELFOGTYPE = true;
  99. #endif // _DEBUG
  100. m_nPIXELFOGTYPE = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ;
  101. #ifdef _DEBUG
  102. m_bNUM_LIGHTS = false;
  103. #endif // _DEBUG
  104. m_nNUM_LIGHTS = 0;
  105. #ifdef _DEBUG
  106. m_bAMBIENT_LIGHT = false;
  107. #endif // _DEBUG
  108. m_nAMBIENT_LIGHT = 0;
  109. }
  110. int GetIndex()
  111. {
  112. // Asserts to make sure that we aren't using any skipped combinations.
  113. // Asserts to make sure that we are setting all of the combination vars.
  114. #ifdef _DEBUG
  115. bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE && m_bNUM_LIGHTS && m_bAMBIENT_LIGHT;
  116. Assert( bAllDynamicVarsDefined );
  117. #endif // _DEBUG
  118. return ( 1 * m_nPIXELFOGTYPE ) + ( 2 * m_nNUM_LIGHTS ) + ( 6 * m_nAMBIENT_LIGHT ) + 0;
  119. }
  120. };
  121. #define shaderDynamicTest_teeth_bump_ps20 psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_AMBIENT_LIGHT + 0
  122. static const ShaderComboInformation_t s_DynamicComboArray_teeth_bump_ps20[3] =
  123. {
  124. { "PIXELFOGTYPE", 0, 1 },
  125. { "NUM_LIGHTS", 0, 2 },
  126. { "AMBIENT_LIGHT", 0, 1 },
  127. };
  128. static const ShaderComboSemantics_t teeth_bump_ps20_combos =
  129. {
  130. "teeth_bump_ps20", s_DynamicComboArray_teeth_bump_ps20, 3, NULL, 0
  131. };
  132. class ConstructMe_teeth_bump_ps20
  133. {
  134. public:
  135. ConstructMe_teeth_bump_ps20()
  136. {
  137. GetShaderDLL()->AddShaderComboInformation( &teeth_bump_ps20_combos );
  138. }
  139. };
  140. static ConstructMe_teeth_bump_ps20 s_ConstructMe_teeth_bump_ps20;