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.

57 lines
1.5 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $Header: $
  6. // $NoKeywords: $
  7. //===========================================================================//
  8. #include "shaderlib/cshader.h"
  9. // memdbgon must be the last include file in a .cpp file!!!
  10. #include "tier0/memdbgon.h"
  11. #ifdef _WIN32
  12. DEFINE_FALLBACK_SHADER( Wireframe, Wireframe_Standard )
  13. BEGIN_SHADER( Wireframe_Standard,
  14. "Help for Wireframe_Standard" )
  15. BEGIN_SHADER_PARAMS
  16. SHADER_PARAM_OVERRIDE( BASETEXTURE, SHADER_PARAM_TYPE_TEXTURE, "shadertest/basetexture", "unused", SHADER_PARAM_NOT_EDITABLE )
  17. SHADER_PARAM_OVERRIDE( FRAME, SHADER_PARAM_TYPE_INTEGER, "0", "unused", SHADER_PARAM_NOT_EDITABLE )
  18. SHADER_PARAM_OVERRIDE( BASETEXTURETRANSFORM, SHADER_PARAM_TYPE_MATRIX, "center .5 .5 scale 1 1 rotate 0 translate 0 0", "unused", SHADER_PARAM_NOT_EDITABLE )
  19. END_SHADER_PARAMS
  20. SHADER_INIT_PARAMS()
  21. {
  22. SET_FLAGS( MATERIAL_VAR_NO_DEBUG_OVERRIDE );
  23. SET_FLAGS( MATERIAL_VAR_NOFOG );
  24. SET_FLAGS( MATERIAL_VAR_WIREFRAME );
  25. }
  26. SHADER_INIT
  27. {
  28. }
  29. SHADER_DRAW
  30. {
  31. SHADOW_STATE
  32. {
  33. pShaderShadow->PolyMode( SHADER_POLYMODEFACE_FRONT_AND_BACK, SHADER_POLYMODE_LINE );
  34. SetDefaultBlendingShadowState();
  35. int flags = VERTEX_POSITION | VERTEX_FORMAT_COMPRESSED;
  36. if ( IS_FLAG_SET(MATERIAL_VAR_VERTEXCOLOR) || IS_FLAG_SET(MATERIAL_VAR_VERTEXALPHA) )
  37. {
  38. flags |= VERTEX_COLOR;
  39. }
  40. pShaderShadow->VertexShaderVertexFormat( flags, 0, NULL, 0 );
  41. }
  42. DYNAMIC_STATE
  43. {
  44. }
  45. Draw();
  46. }
  47. END_SHADER
  48. #endif