Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. var ddsBytes = File.ReadAllBytes("C:\\Users\\nlight\\Desktop\\test.dds");
  2. var height = BitConverter.ToInt32(ddsBytes, 12);
  3. var width = BitConverter.ToInt32(ddsBytes, 16);
  4. var texture = new Texture2D(width, height, TextureFormat.DXT5, true);
  5. texture.LoadRawTextureData(ddsBytes);
  6. texture.Apply();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement