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.

62 lines
1.7 KiB

  1. //========= Copyright (c) 1996-2007, Valve Corporation, All rights reserved. ============//
  2. #ifndef LIGHT_SHAFTS_HELPER_H
  3. #define LIGHT_SHAFTS_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 LightShaftsVars_t
  19. {
  20. LightShaftsVars_t() { memset( this, 0xFF, sizeof( LightShaftsVars_t ) ); }
  21. int m_nShadowDepthTexture;
  22. int m_nNoiseTexture;
  23. int m_nNoiseStrength;
  24. int m_nCookieTexture;
  25. int m_nCookieFrameNum;
  26. int m_nWorldToTexture;
  27. int m_nFlashlightColor;
  28. int m_nAttenFactors;
  29. int m_nOriginFarZ;
  30. int m_nQuatOrientation;
  31. int m_nShadowFilterSize;
  32. int m_nShadowAtten;
  33. int m_nShadowJitterSeed;
  34. int m_nUberlight;
  35. int m_nEnableShadows;
  36. int m_nFlashlightTime;
  37. int m_nNumPlanes;
  38. // Uberlight parameters
  39. int m_nUberNearFar;
  40. int m_nUberHeightWidth;
  41. int m_nUberRoundness;
  42. int m_nTime;
  43. int m_nVolumetricIntensity;
  44. };
  45. void InitParamsLightShafts( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, LightShaftsVars_t &info );
  46. void InitLightShafts( CBaseVSShader *pShader, IMaterialVar** params, LightShaftsVars_t &info );
  47. void DrawLightShafts( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
  48. IShaderShadow* pShaderShadow, LightShaftsVars_t &info, VertexCompressionType_t vertexCompression );
  49. #endif // LIGHT_SHAFTS_HELPER_H