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.

56 lines
1.2 KiB

  1. //========= Copyright � 1996-2006, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Projecteding shader for Spy in TF2 (and probably many other things to come)
  4. //
  5. // $NoKeywords: $
  6. //=====================================================================================//
  7. #include "BaseVSShader.h"
  8. #include "convar.h"
  9. #include "projected_dx9_helper.h"
  10. // NOTE: This has to be the last file included!
  11. #include "tier0/memdbgon.h"
  12. DEFINE_FALLBACK_SHADER( Projected, Projected_DX90 )
  13. BEGIN_VS_SHADER( Projected_DX90, "Help for Projected" )
  14. BEGIN_SHADER_PARAMS
  15. SHADER_PARAM( SPECTEXTURE, SHADER_PARAM_TYPE_TEXTURE, "", "" )
  16. END_SHADER_PARAMS
  17. void SetupVars( Projected_DX9_Vars_t& info )
  18. {
  19. info.m_nBaseTextureTransform = BASETEXTURETRANSFORM;
  20. info.m_nBaseTexture = BASETEXTURE;
  21. }
  22. SHADER_INIT_PARAMS()
  23. {
  24. Projected_DX9_Vars_t info;
  25. SetupVars( info );
  26. InitParamsProjected_DX9( this, params, pMaterialName, info );
  27. }
  28. SHADER_FALLBACK
  29. {
  30. return 0;
  31. }
  32. SHADER_INIT
  33. {
  34. Projected_DX9_Vars_t info;
  35. SetupVars( info );
  36. InitProjected_DX9( this, params, info );
  37. }
  38. SHADER_DRAW
  39. {
  40. Projected_DX9_Vars_t info;
  41. SetupVars( info );
  42. DrawProjected_DX9( this, params, pShaderAPI, pShaderShadow, info, vertexCompression );
  43. }
  44. END_SHADER