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.

83 lines
2.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Header: $
  6. // $NoKeywords: $
  7. //=============================================================================
  8. // don't merge into main!!!!!!!!!!!!
  9. #if 0
  10. #include "BaseVSShader.h"
  11. #include "vertextexturetest_vs30.inc"
  12. #include "vertextexturetest_ps30.inc"
  13. BEGIN_VS_SHADER_FLAGS( VertexTextureTest, "Help for VertexTextureTest", SHADER_NOT_EDITABLE )
  14. BEGIN_SHADER_PARAMS
  15. SHADER_PARAM( BASETEXTURE2, SHADER_PARAM_TYPE_TEXTURE, "shadertest/detail", "detail texture" )
  16. SHADER_PARAM( FRAME2, SHADER_PARAM_TYPE_INTEGER, "0", "frame number for $basetexture2" )
  17. SHADER_PARAM( BASETEXTURE3, SHADER_PARAM_TYPE_TEXTURE, "shadertest/detail", "detail texture" )
  18. SHADER_PARAM( FRAME3, SHADER_PARAM_TYPE_INTEGER, "0", "frame number for $basetexture2" )
  19. END_SHADER_PARAMS
  20. SHADER_INIT_PARAMS()
  21. {
  22. }
  23. SHADER_FALLBACK
  24. {
  25. if ( g_pHardwareConfig->GetDXSupportLevel() < 95 )
  26. {
  27. Assert( 0 );
  28. return "Wireframe";
  29. }
  30. return 0;
  31. }
  32. SHADER_INIT
  33. {
  34. LoadTexture( BASETEXTURE );
  35. LoadTexture( BASETEXTURE2 );
  36. LoadTexture( BASETEXTURE3 );
  37. }
  38. SHADER_DRAW
  39. {
  40. SHADOW_STATE
  41. {
  42. pShaderShadow->EnableTexture( SHADER_TEXTURE_STAGE0, true );
  43. pShaderShadow->EnableTexture( SHADER_TEXTURE_STAGE1, true );
  44. pShaderShadow->EnableTexture( SHADER_TEXTURE_STAGE2, true );
  45. unsigned int flags = VERTEX_POSITION;
  46. pShaderShadow->VertexShaderVertexFormat( flags, 1, 0, 0, 0 );
  47. pShaderShadow->SetMorphFormat( MORPH_POSITION | MORPH_NORMAL | MORPH_WRINKLE );
  48. DECLARE_STATIC_VERTEX_SHADER( vertextexturetest_vs30 );
  49. SET_STATIC_VERTEX_SHADER( vertextexturetest_vs30 );
  50. DECLARE_STATIC_PIXEL_SHADER( vertextexturetest_ps30 );
  51. SET_STATIC_PIXEL_SHADER( vertextexturetest_ps30 );
  52. FogToFogColor();
  53. }
  54. DYNAMIC_STATE
  55. {
  56. BindTexture( SHADER_TEXTURE_STAGE0, BASETEXTURE, FRAME );
  57. BindTexture( SHADER_TEXTURE_STAGE1, BASETEXTURE2, FRAME2 );
  58. BindTexture( SHADER_TEXTURE_STAGE2, BASETEXTURE3, FRAME3 );
  59. SetVertexShaderTextureTransform( VERTEX_SHADER_SHADER_SPECIFIC_CONST_0, BASETEXTURETRANSFORM );
  60. DECLARE_DYNAMIC_VERTEX_SHADER( vertextexturetest_vs30 );
  61. SET_DYNAMIC_VERTEX_SHADER( vertextexturetest_vs30 );
  62. DECLARE_DYNAMIC_PIXEL_SHADER( vertextexturetest_ps30 );
  63. SET_DYNAMIC_PIXEL_SHADER( vertextexturetest_ps30 );
  64. }
  65. Draw( );
  66. }
  67. END_SHADER
  68. #endif