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.

63 lines
1.8 KiB

  1. //====== Copyright (c) 1996-2006, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef CLOAK_DX9_HELPER_H
  7. #define CLOAK_DX9_HELPER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include <string.h>
  12. //-----------------------------------------------------------------------------
  13. // Forward declarations
  14. //-----------------------------------------------------------------------------
  15. class CBaseVSShader;
  16. class IMaterialVar;
  17. class IShaderDynamicAPI;
  18. class IShaderShadow;
  19. //-----------------------------------------------------------------------------
  20. // Init params/ init/ draw methods
  21. //-----------------------------------------------------------------------------
  22. struct Cloak_DX9_Vars_t
  23. {
  24. Cloak_DX9_Vars_t() { memset( this, 0xFF, sizeof( *this ) ); }
  25. int m_nBaseTexture;
  26. int m_nRefractAmount;
  27. int m_nRefractTint;
  28. int m_nNormalMap;
  29. int m_nBumpFrame;
  30. int m_nBumpTransform;
  31. int m_nRefractTintTexture;
  32. int m_nRefractTintTextureFrame;
  33. int m_nFresnelReflection;
  34. int m_nMasked;
  35. int m_nCloakFactor;
  36. int m_nDiffuseWarpTexture;
  37. int m_nPhongExponent;
  38. int m_nPhongTint;
  39. int m_nPhongAlbedoTint;
  40. int m_nPhongExponentTexture;
  41. int m_nPhongBoost;
  42. int m_nPhongFresnelRanges;
  43. // Rim lighting parameters
  44. int m_nRimLight;
  45. int m_nRimLightPower;
  46. int m_nRimLightBoost;
  47. int m_nRimMask;
  48. };
  49. void InitParamsCloak_DX9( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName,
  50. Cloak_DX9_Vars_t &info );
  51. void InitCloak_DX9( CBaseVSShader *pShader, IMaterialVar** params, Cloak_DX9_Vars_t &info );
  52. void DrawCloak_DX9( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
  53. IShaderShadow* pShaderShadow, Cloak_DX9_Vars_t &info, VertexCompressionType_t vertexCompression );
  54. #endif // CLOAK_DX9_HELPER_H