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.

89 lines
2.4 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 projected_ps20_Static_Index
  9. {
  10. public:
  11. // CONSTRUCTOR
  12. projected_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_projected_ps20 0
  25. class projected_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. public:
  50. // CONSTRUCTOR
  51. projected_ps20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  52. {
  53. #ifdef _DEBUG
  54. m_bPIXELFOGTYPE = true;
  55. #endif // _DEBUG
  56. m_nPIXELFOGTYPE = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ;
  57. }
  58. int GetIndex()
  59. {
  60. // Asserts to make sure that we aren't using any skipped combinations.
  61. // Asserts to make sure that we are setting all of the combination vars.
  62. #ifdef _DEBUG
  63. bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE;
  64. Assert( bAllDynamicVarsDefined );
  65. #endif // _DEBUG
  66. return ( 1 * m_nPIXELFOGTYPE ) + 0;
  67. }
  68. };
  69. #define shaderDynamicTest_projected_ps20 0
  70. static const ShaderComboInformation_t s_DynamicComboArray_projected_ps20[1] =
  71. {
  72. { "PIXELFOGTYPE", 0, 1 },
  73. };
  74. static const ShaderComboSemantics_t projected_ps20_combos =
  75. {
  76. "projected_ps20", s_DynamicComboArray_projected_ps20, 1, NULL, 0
  77. };
  78. class ConstructMe_projected_ps20
  79. {
  80. public:
  81. ConstructMe_projected_ps20()
  82. {
  83. GetShaderDLL()->AddShaderComboInformation( &projected_ps20_combos );
  84. }
  85. };
  86. static ConstructMe_projected_ps20 s_ConstructMe_projected_ps20;