home *** CD-ROM | disk | FTP | other *** search
/ NVIDIA Tech Demo: DAWN / NVIDIA_demo.iso / Dawn.exe / Disk1 / data1.cab / Program_Executable_Files / shaders / _scr_tex.vp20 < prev    next >
Encoding:
Text File  |  2003-02-11  |  546 b   |  22 lines

  1. // This is a simple vertex shader for passing screen
  2. // coordinates unchanged to the fragment shader
  3.  
  4. // holds nothing but 3d position
  5. struct a2vConnector : application2vertex {
  6.     float3 coord:ATTR0;
  7.     float2 texcoord:ATTR1;
  8. };
  9.  
  10. // holds nothing but 3d position
  11. struct v2fConnector : vertex2fragment {
  12.     float3 coord:HPOS;
  13.     float2 texture:TEX0;
  14. };
  15.  
  16. // moves the coord over and returns the new connector
  17. v2fConnector main(a2vConnector a2v){
  18.     v2fConnector v2f;
  19.     v2f.coord   = a2v.coord;
  20.     v2f.texture = a2v.texcoord;
  21.     return v2f;
  22. }