Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ddsBytes = File.ReadAllBytes("C:\\Users\\nlight\\Desktop\\test.dds");
- var height = BitConverter.ToInt32(ddsBytes, 12);
- var width = BitConverter.ToInt32(ddsBytes, 16);
- var texture = new Texture2D(width, height, TextureFormat.DXT5, true);
- texture.LoadRawTextureData(ddsBytes);
- texture.Apply();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement