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.

68 lines
2.0 KiB

  1. //====== Copyright (c) 1996-2006, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef REFRACT_DX9_HELPER_H
  7. #define REFRACT_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 Refract_DX9_Vars_t
  23. {
  24. Refract_DX9_Vars_t() { memset( this, 0xFF, sizeof( *this ) ); }
  25. int m_nBaseTexture;
  26. int m_nFrame;
  27. int m_nRefractAmount;
  28. int m_nRefractTint;
  29. int m_nNormalMap;
  30. int m_nNormalMap2;
  31. int m_nBumpFrame;
  32. int m_nBumpFrame2;
  33. int m_nBumpTransform;
  34. int m_nBumpTransform2;
  35. int m_nBlurAmount;
  36. int m_nFadeOutOnSilhouette;
  37. int m_nEnvmap;
  38. int m_nEnvmapFrame;
  39. int m_nEnvmapTint;
  40. int m_nEnvmapContrast;
  41. int m_nEnvmapSaturation;
  42. int m_nRefractTintTexture;
  43. int m_nRefractTintTextureFrame;
  44. int m_nFresnelReflection;
  45. int m_nNoWriteZ;
  46. int m_nMasked;
  47. int m_nVertexColorModulate;
  48. int m_nNoViewportFixup;
  49. int m_nMirrorAboutViewportEdges;
  50. int m_nMagnifyEnable;
  51. int m_nMagnifyCenter;
  52. int m_nMagnifyScale;
  53. int m_nLocalRefract;
  54. int m_nLocalRefractDepth;
  55. };
  56. void InitParamsRefract_DX9( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName,
  57. Refract_DX9_Vars_t &info );
  58. void InitRefract_DX9( CBaseVSShader *pShader, IMaterialVar** params, Refract_DX9_Vars_t &info );
  59. void DrawRefract_DX9( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
  60. IShaderShadow* pShaderShadow, Refract_DX9_Vars_t &info, VertexCompressionType_t vertexCompression );
  61. #endif // REFRACT_DX9_HELPER_H