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.6 KiB

  1. //========= Copyright � 1996-2005, 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. SHADER_PARAM( DISPLACEMENTMAP, SHADER_PARAM_TYPE_TEXTURE, "shadertest/BaseTexture", "Displacement map" )
  15. SHADER_PARAM( DISPLACEMENTWRINKLE, SHADER_PARAM_TYPE_BOOL, "0", "Displacement map contains wrinkle displacements")
  16. END_SHADER_PARAMS
  17. SHADER_FALLBACK
  18. {
  19. return 0;
  20. }
  21. SHADER_INIT_PARAMS()
  22. {
  23. VertexLitGeneric_DX9_Vars_t vars;
  24. vars.m_nDisplacementMap = DISPLACEMENTMAP;
  25. vars.m_nDisplacementWrinkleMap = DISPLACEMENTWRINKLE;
  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. vars.m_nDisplacementMap = DISPLACEMENTMAP;
  35. vars.m_nDisplacementWrinkleMap = DISPLACEMENTWRINKLE;
  36. InitVertexLitGeneric_DX9( this, params, false, vars );
  37. }
  38. SHADER_DRAW
  39. {
  40. VertexLitGeneric_DX9_Vars_t vars;
  41. vars.m_nDisplacementMap = DISPLACEMENTMAP;
  42. vars.m_nDisplacementWrinkleMap = DISPLACEMENTWRINKLE;
  43. DrawVertexLitGeneric_DX9( this, params, pShaderAPI, pShaderShadow, false, vars, vertexCompression, pContextDataPtr );
  44. }
  45. END_SHADER