Advertisement
Guest User

texture swizzle 2

a guest
Mar 28th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. for (int y = 0; y < 16; ++y)
  2. {
  3.     for (int x = 0; x < 16; ++x)
  4.     {
  5.         const int offset = computeTilingLayout(x, y); // some magical hardware architecture specific formula
  6.         dest[offset] = source[index++];
  7.     }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement