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.

51 lines
1.9 KiB

  1. //========= Copyright (c) 1996-2006, Valve Corporation, All rights reserved. ============//
  2. #ifndef PORTALREFRACT_HELPER_H
  3. #define PORTALREFRACT_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 PortalRefractVars_t
  19. {
  20. PortalRefractVars_t() { memset( this, 0xFF, sizeof(PortalRefractVars_t) ); }
  21. int m_nStage;
  22. int m_nPortalOpenAmount;
  23. int m_nPortalStatic;
  24. int m_nPortalMaskTexture;
  25. int m_nTextureTransform;
  26. int m_nPortalColorTexture;
  27. int m_nPortalColorGradientDark;
  28. int m_nPortalColorGradientLight;
  29. int m_nPortalColorScale;
  30. int m_nTime;
  31. int m_nUseOnStaticProp;
  32. };
  33. // Default values (Arrays should only be vec[4])
  34. static const float kDefaultPortalStatic = 0.0f;
  35. static const float kDefaultPortalOpenAmount = 0.0f;
  36. static const float kDefaultPortalColorScale = 1.0f;
  37. static const float kDefaultPortalColorGradientDark[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
  38. static const float kDefaultPortalColorGradientLight[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
  39. void InitParamsPortalRefract( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, PortalRefractVars_t &info );
  40. void InitPortalRefract( CBaseVSShader *pShader, IMaterialVar** params, PortalRefractVars_t &info );
  41. void DrawPortalRefract( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
  42. IShaderShadow* pShaderShadow, PortalRefractVars_t &info, VertexCompressionType_t vertexCompression );
  43. #endif // PortalRefract_HELPER_H