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.

51 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. #ifndef WEAPON_SHEEN_PASS_HELPER_H
  3. #define WEAPON_SHEEN_PASS_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 WeaponSheenPassVars_t
  19. {
  20. WeaponSheenPassVars_t() { memset( this, 0xFF, sizeof(WeaponSheenPassVars_t) ); }
  21. int m_nSheenMap;
  22. int m_nSheenMapMask;
  23. int m_nSheenMapMaskFrame;
  24. int m_nSheenMapTint;
  25. int m_nSheenMapMaskScaleX;
  26. int m_nSheenMapMaskScaleY;
  27. int m_nSheenMapMaskOffsetX;
  28. int m_nSheenMapMaskOffsetY;
  29. int m_nSheenMapMaskDirection;
  30. int m_nSheenIndex;
  31. int m_nBumpmap;
  32. int m_nBumpFrame;
  33. int m_nBumpTransform;
  34. };
  35. static const float kDefaultSheenColorTint[4] = { 0.0f, 1.0f, 0.0f, 1.0f };
  36. void InitParamsWeaponSheenPass( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, WeaponSheenPassVars_t &info );
  37. void InitWeaponSheenPass( CBaseVSShader *pShader, IMaterialVar** params, WeaponSheenPassVars_t &info );
  38. void DrawWeaponSheenPass( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
  39. IShaderShadow* pShaderShadow, WeaponSheenPassVars_t &info, VertexCompressionType_t vertexCompression );
  40. bool ShouldDrawMaterialSheen ( IMaterialVar** params, WeaponSheenPassVars_t &info );
  41. #endif // WEAPON_SHEEN_PASS_HELPER_H