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.

45 lines
1002 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: A shader that builds the shadow using render-to-texture
  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. DEFINE_FALLBACK_SHADER( ShadowBuild, ShadowBuild_DX6 )
  12. BEGIN_SHADER_FLAGS( ShadowBuild_DX6, "Help for ShadowBuild", SHADER_NOT_EDITABLE )
  13. BEGIN_SHADER_PARAMS
  14. END_SHADER_PARAMS
  15. SHADER_INIT_PARAMS()
  16. {
  17. }
  18. SHADER_INIT
  19. {
  20. }
  21. SHADER_DRAW
  22. {
  23. SHADOW_STATE
  24. {
  25. pShaderShadow->EnableAlphaWrites( true );
  26. pShaderShadow->EnableConstantColor( true );
  27. pShaderShadow->EnableConstantAlpha( true );
  28. pShaderShadow->EnableDepthWrites( false );
  29. pShaderShadow->EnableDepthTest( false );
  30. pShaderShadow->DrawFlags( SHADER_DRAW_POSITION );
  31. FogToGrey();
  32. }
  33. DYNAMIC_STATE
  34. {
  35. }
  36. Draw( );
  37. }
  38. END_SHADER