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.

49 lines
1.6 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: Stateless light computation routines
  4. //
  5. //===========================================================================//
  6. #ifndef R_STUDIOLIGHT_H
  7. #define R_STUDIOLIGHT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier0/platform.h"
  12. #if defined( _WIN32 ) && !defined( _X360 )
  13. #include <xmmintrin.h>
  14. #endif
  15. //-----------------------------------------------------------------------------
  16. // Forward declarations
  17. //-----------------------------------------------------------------------------
  18. class Vector;
  19. class Vector4D;
  20. class FourVectors;
  21. struct lightpos_t;
  22. struct LightDesc_t;
  23. //-----------------------------------------------------------------------------
  24. // Stateless light computation routines
  25. //-----------------------------------------------------------------------------
  26. // Computes the ambient term
  27. void R_LightAmbient_4D( const Vector& normal, Vector4D* pLightBoxColor, Vector &lv );
  28. void R_LightStrengthWorld( const Vector& vert, int lightcount, LightDesc_t* pLightDesc, lightpos_t *light );
  29. float FASTCALL R_WorldLightDistanceFalloff( const LightDesc_t *wl, const Vector& delta );
  30. // Copies lighting state into a buffer, returns number of lights copied
  31. int CopyLocalLightingState( int nMaxLights, LightDesc_t *pDest, int nLightCount, const LightDesc_t *pSrc );
  32. #if defined( _WIN32 ) && !defined( _X360 )
  33. // SSE optimized versions
  34. void R_LightAmbient_4D( const FourVectors& normal, Vector4D* pLightBoxColor, FourVectors &lv );
  35. __m128 FASTCALL R_WorldLightDistanceFalloff( const LightDesc_t *wl, const FourVectors& delta );
  36. #endif
  37. #endif // R_STUDIOLIGHT_H