home *** CD-ROM | disk | FTP | other *** search
/ DarkBasic Professional / DarkBasicPro.iso / data1.cab / Lang_Files_(English) / Help / examples / 3dmaths / vshader.vsh < prev   
Encoding:
Text File  |  2004-09-22  |  563 b   |  18 lines

  1. // vertex shader version
  2. vs.1.0
  3.  
  4. dcl_position      v0
  5. dcl_normal        v3
  6. dcl_color         v6
  7. dcl_texcoord0     v7
  8.  
  9. // take the vertex position data ( v0 ) and multiply it by the matrix which we have put in 
  10. // register 0, the result is stored in oPos which is the position output register
  11. m4x4 oPos, v0, c0 
  12.  
  13. // calculate the amount of light falling on a vertex by taking the normal and dot it with the light vector
  14. dp3 r0, v3, c4
  15.  
  16. // pass the texture coordinates from the input register ( v7 ) into the output register ( oT0 )
  17. mov oT0.xy, v7
  18.