Team Fortress 2 Source Code as on 22/4/2020
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.

56 lines
1.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. #ifndef AFTERSHOCK_HELPER_H
  3. #define AFTERSHOCK_HELPER_H
  4. #ifdef _WIN32
  5. #pragma once
  6. #endif
  7. #include <string.h>
  8. //-----------------------------------------------------------------------------
  9. // Forward declarations
  10. //-----------------------------------------------------------------------------
  11. class CBaseVSShader;
  12. class IMaterialVar;
  13. class IShaderDynamicAPI;
  14. class IShaderShadow;
  15. //-----------------------------------------------------------------------------
  16. // Init params/ init/ draw methods
  17. //-----------------------------------------------------------------------------
  18. struct AftershockVars_t
  19. {
  20. AftershockVars_t() { memset( this, 0xFF, sizeof(AftershockVars_t) ); }
  21. int m_nColorTint;
  22. int m_nRefractAmount;
  23. int m_nBumpmap;
  24. int m_nBumpFrame;
  25. int m_nBumpTransform;
  26. int m_nSilhouetteThickness;
  27. int m_nSilhouetteColor;
  28. int m_nGroundMin;
  29. int m_nGroundMax;
  30. int m_nBlurAmount;
  31. int m_nTime;
  32. };
  33. // Default values (Arrays should only be vec[4])
  34. static const float kDefaultColorTint[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
  35. static const float kDefaultRefractAmount = 0.1f;
  36. static const float kDefaultSilhouetteThickness = 0.2f;
  37. static const float kDefaultSilhouetteColor[4] = { 0.3f, 0.3f, 0.5f, 1.0f };
  38. static const float kDefaultGroundMin = -0.3f;
  39. static const float kDefaultGroundMax = -0.1f;
  40. static const float kDefaultBlurAmount = 0.01f;
  41. void InitParamsAftershock( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, AftershockVars_t &info );
  42. void InitAftershock( CBaseVSShader *pShader, IMaterialVar** params, AftershockVars_t &info );
  43. void DrawAftershock( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
  44. IShaderShadow* pShaderShadow, AftershockVars_t &info, VertexCompressionType_t vertexCompression );
  45. #endif // AFTERSHOCK_HELPER_H