feat(core): add SurfaceDecoder for A8R8G8B8 and BCn formats
This commit is contained in:
parent
f915a13263
commit
dbf913ebb4
4 changed files with 170 additions and 0 deletions
10
src/AcDream.Core/Textures/DecodedTexture.cs
Normal file
10
src/AcDream.Core/Textures/DecodedTexture.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
namespace AcDream.Core.Textures;
|
||||
|
||||
public sealed record DecodedTexture(byte[] Rgba8, int Width, int Height)
|
||||
{
|
||||
/// <summary>1x1 magenta fallback for missing/unsupported textures.</summary>
|
||||
public static readonly DecodedTexture Magenta = new(
|
||||
Rgba8: [0xFF, 0x00, 0xFF, 0xFF],
|
||||
Width: 1,
|
||||
Height: 1);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue