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.

52 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=====================================================================================//
  6. #include "BaseVSShader.h"
  7. #include "vertexlitgeneric_dx9_helper.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. DEFINE_FALLBACK_SHADER( Wireframe, Wireframe_DX9 )
  11. BEGIN_VS_SHADER( Wireframe_DX9,
  12. "Help for Wireframe_DX9" )
  13. BEGIN_SHADER_PARAMS
  14. END_SHADER_PARAMS
  15. SHADER_FALLBACK
  16. {
  17. if ( IsWindows() && g_pHardwareConfig->GetDXSupportLevel() < 90 )
  18. {
  19. return "Wireframe_DX8";
  20. }
  21. return 0;
  22. }
  23. SHADER_INIT_PARAMS()
  24. {
  25. VertexLitGeneric_DX9_Vars_t vars;
  26. InitParamsVertexLitGeneric_DX9( this, params, pMaterialName, false, vars );
  27. SET_FLAGS( MATERIAL_VAR_NO_DEBUG_OVERRIDE );
  28. SET_FLAGS( MATERIAL_VAR_NOFOG );
  29. SET_FLAGS( MATERIAL_VAR_WIREFRAME );
  30. }
  31. SHADER_INIT
  32. {
  33. VertexLitGeneric_DX9_Vars_t vars;
  34. InitVertexLitGeneric_DX9( this, params, false, vars );
  35. }
  36. SHADER_DRAW
  37. {
  38. VertexLitGeneric_DX9_Vars_t vars;
  39. DrawVertexLitGeneric_DX9( this, params, pShaderAPI, pShaderShadow, false, vars, vertexCompression, pContextDataPtr );
  40. }
  41. END_SHADER