Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. // Width, 0.0f, 0.0f, 0.0f
  2. pt.set(((( r - l ) / size.x) * 2.0f) / ( r - l ), 0.0f, 0.0f, 0.0f);
  3. mTempMatrix.setRow(0, pt);
  4.  
  5. // 0.0f, -Height, 0.0f, 0.0f
  6. pt.set(0.0f, ((( b - t ) / size.y) * -2.0f) / ( b - t ), 0.0f, 0.0f);
  7. mTempMatrix.setRow(1, pt);
  8.  
  9. // 0.0f, 0.0f, Depth?, 0.0f
  10. pt.set(0.0f, 0.0f, 1.0f, 0.0f);
  11. mTempMatrix.setRow(2, pt);
  12.  
  13. F32 one_x_pix = 1.0 / size.x;
  14. F32 one_y_pix = 1.0 / size.y;
  15.  
  16. // X, -Y, Z, 1.0f
  17. pt.set((-2.0 / size.x) - (1.0 - one_x_pix), (2.0 / size.y) + (1.0 - one_y_pix), 1.0f, 1.0f);
  18. mTempMatrix.setRow(3, pt);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement