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.

72 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #include "BaseVSShader.h"
  8. #include "morphweight_vs30.inc"
  9. #include "morphweight_ps30.inc"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. //#define V1 1
  13. DEFINE_FALLBACK_SHADER( MorphWeight, MorphWeight_DX9 )
  14. BEGIN_VS_SHADER_FLAGS( MorphWeight_DX9, "Help for morphweight", SHADER_NOT_EDITABLE )
  15. BEGIN_SHADER_PARAMS
  16. END_SHADER_PARAMS
  17. SHADER_INIT_PARAMS()
  18. {
  19. }
  20. SHADER_FALLBACK
  21. {
  22. return 0;
  23. }
  24. SHADER_INIT
  25. {
  26. }
  27. SHADER_DRAW
  28. {
  29. SHADOW_STATE
  30. {
  31. pShaderShadow->EnableDepthTest( false );
  32. pShaderShadow->EnableDepthWrites( false );
  33. pShaderShadow->EnableAlphaWrites( true );
  34. pShaderShadow->EnableCulling( false );
  35. pShaderShadow->FogMode( SHADER_FOGMODE_DISABLED );
  36. DECLARE_STATIC_VERTEX_SHADER( morphweight_vs30 );
  37. SET_STATIC_VERTEX_SHADER( morphweight_vs30 );
  38. DECLARE_STATIC_PIXEL_SHADER( morphweight_ps30 );
  39. SET_STATIC_PIXEL_SHADER( morphweight_ps30 );
  40. // Texcoord0 is the texcoord to write the weights into
  41. // Texcoord1 contains the morph weights
  42. int pTexCoord[2] = { 2, 4 };
  43. pShaderShadow->VertexShaderVertexFormat( VERTEX_FORMAT_USE_EXACT_FORMAT, 2, pTexCoord, 0 );
  44. }
  45. DYNAMIC_STATE
  46. {
  47. DECLARE_DYNAMIC_VERTEX_SHADER( morphweight_vs30 );
  48. SET_DYNAMIC_VERTEX_SHADER( morphweight_vs30 );
  49. DECLARE_DYNAMIC_PIXEL_SHADER( morphweight_ps30 );
  50. SET_DYNAMIC_PIXEL_SHADER( morphweight_ps30 );
  51. }
  52. Draw();
  53. }
  54. END_SHADER