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.

66 lines
1.4 KiB

  1. //===== Copyright � 1996-2007, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Run procedural glint generation inner loop in pixel shader
  4. //
  5. // $Header: $
  6. // $NoKeywords: $
  7. //===========================================================================//
  8. #include "BaseVSShader.h"
  9. #include "shaderlib/cshader.h"
  10. #include "eyeglint_vs20.inc"
  11. #include "eyeglint_ps20.inc"
  12. #include "eyeglint_ps20b.inc"
  13. // NOTE: This has to be the last file included!
  14. #include "tier0/memdbgon.h"
  15. DEFINE_FALLBACK_SHADER( EyeGlint, EyeGlint_dx9 )
  16. BEGIN_VS_SHADER( EyeGlint_dx9, "Help for EyeGlint" )
  17. BEGIN_SHADER_PARAMS
  18. END_SHADER_PARAMS
  19. SHADER_INIT
  20. {
  21. }
  22. SHADER_FALLBACK
  23. {
  24. return 0;
  25. }
  26. SHADER_DRAW
  27. {
  28. SHADOW_STATE
  29. {
  30. pShaderShadow->EnableDepthWrites( false );
  31. pShaderShadow->EnableBlending( true );
  32. pShaderShadow->BlendFunc( SHADER_BLEND_ONE, SHADER_BLEND_ONE ); // Additive blending
  33. int pTexCoords[3] = { 2, 2, 3 };
  34. pShaderShadow->VertexShaderVertexFormat( VERTEX_POSITION, 3, pTexCoords, 0 );
  35. pShaderShadow->EnableCulling( false );
  36. pShaderShadow->EnableSRGBWrite( false ); // linear texture
  37. DECLARE_STATIC_VERTEX_SHADER( eyeglint_vs20 );
  38. SET_STATIC_VERTEX_SHADER( eyeglint_vs20 );
  39. SET_STATIC_PS2X_PIXEL_SHADER_NO_COMBOS( eyeglint );
  40. }
  41. DYNAMIC_STATE
  42. {
  43. DECLARE_DYNAMIC_VERTEX_SHADER( eyeglint_vs20 );
  44. SET_DYNAMIC_VERTEX_SHADER( eyeglint_vs20 );
  45. SET_DYNAMIC_PS2X_PIXEL_SHADER_NO_COMBOS( eyeglint );
  46. }
  47. Draw();
  48. }
  49. END_SHADER