Guest User

Untitled

a guest
Jun 21st, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. vs.1.1
  2. ;------------------------------------------------------------------------------
  3. ; Constants specified by the app
  4. ; c0-c83 = bone matrix index 0 ~ 28
  5. ; c84-c87 = matViewProj
  6. ; c88-c91 = reserved
  7. ; c92 = light direction
  8. ; c93 = material diffuse color * light diffuse color
  9. ; c94 = material ambient color
  10. ; c95 = const 1.0f, 0, ....
  11. ;
  12. ;
  13. ; Vertex components (as specified in the vertex DECL)
  14. ; v0 = Position
  15. ; v1.x = matrix idx
  16. ; v2 = Normal
  17. ; v3 = Texcoords
  18. ;------------------------------------------------------------------------------
  19.  
  20.  
  21. ;------------------------------------------------------------------------------
  22. ; Vertex blending
  23. ;------------------------------------------------------------------------------
  24.  
  25. ; Transform position for world0 matrix
  26. mov a0.x, v1.x
  27.  
  28. m4x3 r0, v0, c[a0.x] ;pos transform
  29. m3x3 r3, v2, c[a0.x] ;normal transform
  30. mov r0.w, c95.x ; r0.w = 1.0f
  31.  
  32. m4x4 oPos, r0, c84 ; oPos =
  33.  
  34. ;------------------------------------------------------------------------------
  35. ; Lighting calculation
  36. ;------------------------------------------------------------------------------
  37. ; directional light
  38. ;dp3 r1.x, r3, c92 ; N ¿Í L ÀÇ ³»Àû
  39. ;mul r2, r1.x, c93 ; n * diffuse
  40. ;add oD0, r2, c94 ; + ambient
  41. mov oD0, c95.xxxx ; no lighting
  42.  
  43. ;------------------------------------------------------------------------------
  44. ; Texture coordinates
  45. ;------------------------------------------------------------------------------
  46.  
  47. ; Just copy the texture coordinates
  48. mov oT0, v3
Add Comment
Please, Sign In to add comment