feat: normalized alpha

This commit is contained in:
TrèsAbhi committed 2023-12-28 18:36:28 -06:00
1 parent fdd8aac017
commit 0f9f15b268
2 files changed
+31 -36

No files matched your search

-1
View File
@@ -6,7 +6,6 @@ export async function readTexture(path: string) {
const ddsTexturePath = path.replace('.tex', '.dx11.dds.dvpl');
const decompressedDvpl = await readDVPLFile(ddsTexturePath);
const stream = new DdsStream(decompressedDvpl);
console.log('Reading', ddsTexturePath);
const ddsRaw = await stream.dds();
return await sharp(ddsRaw.data, { raw: ddsRaw }).png().toBuffer();