fix: bc1 alpha check

This commit is contained in:
TrèsAbhi committed 2023-12-29 19:59:01 -06:00
1 parent 376b3f04e5
commit fa625dc887
2 files changed
+3 -3

No files matched your search

+3 -1
View File
@@ -177,6 +177,8 @@ export class DdsStream extends WindowsStream {
const header = this.header();
const dxgiFormat = this.resolveDxgiFormat(header);
console.log(DxgiFormat[dxgiFormat]);
switch (dxgiFormat) {
case DxgiFormat.BC1_TYPELESS:
case DxgiFormat.BC1_UNORM:
@@ -350,7 +352,7 @@ export class DdsStream extends WindowsStream {
const color0 = this.R5G6B5A0();
const int1 = this.readR5G6B5Int();
const color1 = this.R5G6B5A0();
const alpha = int0 > int1;
const alpha = int0 < int1;
const color2 = alpha
? (color0.map(
(channel0, index) => (channel0 + color1[index]) / 2,
-2
View File
@@ -96,8 +96,6 @@ export class PvrStream extends BufferStream {
const header = this.header();
const metadata = this.metadata();
console.log(header, metadata);
if (typeof header.pixelFormat === 'number') {
switch (header.pixelFormat) {
default: