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.

95 lines
2.9 KiB

  1. // ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
  2. // ( $CASCADED_SHADOW_MAPPING == 0 ) && ( $DYN_CSM_ENABLED == 1 )
  3. // defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
  4. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPTINT && $LIGHTING_PREVIEW && $FASTPATHENVMAPTINT
  5. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPCONTRAST && $LIGHTING_PREVIEW && $FASTPATHENVMAPCONTRAST
  6. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  7. // ($FLASHLIGHT || $FLASHLIGHTSHADOWS) && $LIGHTING_PREVIEW
  8. // defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
  9. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPTINT && $LIGHTING_PREVIEW && $FASTPATHENVMAPTINT
  10. // defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPCONTRAST && $LIGHTING_PREVIEW && $FASTPATHENVMAPCONTRAST
  11. // defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
  12. // ($FLASHLIGHT || $FLASHLIGHTSHADOWS) && $LIGHTING_PREVIEW
  13. #include "shaderlib/cshader.h"
  14. class cs_grass_ps20_Static_Index
  15. {
  16. public:
  17. // CONSTRUCTOR
  18. cs_grass_ps20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
  19. {
  20. }
  21. int GetIndex()
  22. {
  23. // Asserts to make sure that we aren't using any skipped combinations.
  24. // Asserts to make sure that we are setting all of the combination vars.
  25. #ifdef _DEBUG
  26. #endif // _DEBUG
  27. return 0;
  28. }
  29. };
  30. #define shaderStaticTest_cs_grass_ps20 0
  31. class cs_grass_ps20_Dynamic_Index
  32. {
  33. private:
  34. int m_nPIXELFOGTYPE;
  35. #ifdef _DEBUG
  36. bool m_bPIXELFOGTYPE;
  37. #endif
  38. public:
  39. void SetPIXELFOGTYPE( int i )
  40. {
  41. Assert( i >= 0 && i <= 1 );
  42. m_nPIXELFOGTYPE = i;
  43. #ifdef _DEBUG
  44. m_bPIXELFOGTYPE = true;
  45. #endif
  46. }
  47. void SetPIXELFOGTYPE( bool i )
  48. {
  49. Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
  50. m_nPIXELFOGTYPE = i ? 1 : 0;
  51. #ifdef _DEBUG
  52. m_bPIXELFOGTYPE = true;
  53. #endif
  54. }
  55. public:
  56. // CONSTRUCTOR
  57. cs_grass_ps20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
  58. {
  59. #ifdef _DEBUG
  60. m_bPIXELFOGTYPE = true;
  61. #endif // _DEBUG
  62. m_nPIXELFOGTYPE = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ;
  63. }
  64. int GetIndex()
  65. {
  66. // Asserts to make sure that we aren't using any skipped combinations.
  67. // Asserts to make sure that we are setting all of the combination vars.
  68. #ifdef _DEBUG
  69. bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE;
  70. Assert( bAllDynamicVarsDefined );
  71. #endif // _DEBUG
  72. return ( 1 * m_nPIXELFOGTYPE ) + 0;
  73. }
  74. };
  75. #define shaderDynamicTest_cs_grass_ps20 0
  76. static const ShaderComboInformation_t s_DynamicComboArray_cs_grass_ps20[1] =
  77. {
  78. { "PIXELFOGTYPE", 0, 1 },
  79. };
  80. static const ShaderComboSemantics_t cs_grass_ps20_combos =
  81. {
  82. "cs_grass_ps20", s_DynamicComboArray_cs_grass_ps20, 1, NULL, 0
  83. };
  84. class ConstructMe_cs_grass_ps20
  85. {
  86. public:
  87. ConstructMe_cs_grass_ps20()
  88. {
  89. GetShaderDLL()->AddShaderComboInformation( &cs_grass_ps20_combos );
  90. }
  91. };
  92. static ConstructMe_cs_grass_ps20 s_ConstructMe_cs_grass_ps20;