Team Fortress 2 Source Code as on 22/4/2020
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.

66 lines
1.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Header: $
  6. // $NoKeywords: $
  7. //===========================================================================//
  8. #include "BaseVSShader.h"
  9. #include "particlelitgeneric_dx9_helper.h"
  10. BEGIN_VS_SHADER( ParticleLitGeneric_DX9,
  11. "Help for ParticleLitGeneric_DX9" )
  12. BEGIN_SHADER_PARAMS
  13. SHADER_PARAM( BUMPMAP, SHADER_PARAM_TYPE_TEXTURE, "models/shadertest/shader1_normal", "bump map" )
  14. SHADER_PARAM( BUMPFRAME, SHADER_PARAM_TYPE_INTEGER, "0", "frame number for $bumpmap" )
  15. SHADER_PARAM( BUMPTRANSFORM, SHADER_PARAM_TYPE_MATRIX, "center .5 .5 scale 1 1 rotate 0 translate 0 0", "$bumpmap texcoord transform" )
  16. END_SHADER_PARAMS
  17. void SetupVars( ParticleLitGeneric_DX9_Vars_t& info )
  18. {
  19. info.m_nBaseTexture = BASETEXTURE;
  20. info.m_nBaseTextureFrame = FRAME;
  21. info.m_nBaseTextureTransform = BASETEXTURETRANSFORM;
  22. info.m_nBumpmap = BUMPMAP;
  23. info.m_nBumpFrame = BUMPFRAME;
  24. info.m_nBumpTransform = BUMPTRANSFORM;
  25. info.m_nAlphaTestReference = -1;
  26. info.m_nFlashlightTexture = FLASHLIGHTTEXTURE;
  27. info.m_nFlashlightTextureFrame = FLASHLIGHTTEXTUREFRAME;
  28. }
  29. SHADER_INIT_PARAMS()
  30. {
  31. ParticleLitGeneric_DX9_Vars_t vars;
  32. SetupVars( vars );
  33. // InitParamsParticleLitGeneric_DX9( this, params, pMaterialName, vars );
  34. }
  35. SHADER_FALLBACK
  36. {
  37. if (g_pHardwareConfig->GetDXSupportLevel() < 70)
  38. return "ParticleLitGeneric_DX6";
  39. if (g_pHardwareConfig->GetDXSupportLevel() < 80)
  40. return "ParticleLitGeneric_DX7";
  41. return "ParticleLitGeneric_DX8";
  42. return 0;
  43. }
  44. SHADER_INIT
  45. {
  46. ParticleLitGeneric_DX9_Vars_t vars;
  47. SetupVars( vars );
  48. // InitParticleLitGeneric_DX9( this, params, vars );
  49. }
  50. SHADER_DRAW
  51. {
  52. ParticleLitGeneric_DX9_Vars_t vars;
  53. SetupVars( vars );
  54. // DrawParticleLitGeneric_DX9( this, params, pShaderAPI, pShaderShadow, vars );
  55. }
  56. END_SHADER