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.

38 lines
1.1 KiB

  1. //===== Copyright � 1996-2007, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Vertex shader to pass through texcoords needed to run the
  4. // procedural glint generation inner loop in the pixel shader
  5. //
  6. // $Header: $
  7. // $NoKeywords: $
  8. //===========================================================================//
  9. #include "common_vs_fxc.h"
  10. struct VS_INPUT
  11. {
  12. float3 vPos : POSITION;
  13. float2 tc : TEXCOORD0; // Interpolated coordinate of current texel in 3x3 quad
  14. float2 glintCenter : TEXCOORD1; // Uniform value containing center of glint in local 3x3 quad
  15. float3 glintColor : TEXCOORD2; // Uniform value of color of glint
  16. };
  17. struct VS_OUTPUT
  18. {
  19. float4 projPos : POSITION;
  20. float2 tc : TEXCOORD0; // Interpolated coordinate of current texel in 3x3 quad
  21. float2 glintCenter : TEXCOORD1; // Uniform value containing center of glint in local 3x3 quad
  22. float3 glintColor : TEXCOORD2; // Uniform value of color of glint
  23. };
  24. VS_OUTPUT main( const VS_INPUT v )
  25. {
  26. VS_OUTPUT o = ( VS_OUTPUT )0;
  27. o.projPos = float4( v.vPos, 1.0f );
  28. o.tc = v.tc;
  29. o.glintCenter = v.glintCenter;
  30. o.glintColor = v.glintColor;
  31. return o;
  32. }