mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: bc1 alpha check
This commit is contained in:
1 parent
376b3f04e5
commit
fa625dc887
2 files changed
+3
-3
No files matched your search
@@ -177,6 +177,8 @@ export class DdsStream extends WindowsStream {
|
|||||||
const header = this.header();
|
const header = this.header();
|
||||||
const dxgiFormat = this.resolveDxgiFormat(header);
|
const dxgiFormat = this.resolveDxgiFormat(header);
|
||||||
|
|
||||||
|
console.log(DxgiFormat[dxgiFormat]);
|
||||||
|
|
||||||
switch (dxgiFormat) {
|
switch (dxgiFormat) {
|
||||||
case DxgiFormat.BC1_TYPELESS:
|
case DxgiFormat.BC1_TYPELESS:
|
||||||
case DxgiFormat.BC1_UNORM:
|
case DxgiFormat.BC1_UNORM:
|
||||||
@@ -350,7 +352,7 @@ export class DdsStream extends WindowsStream {
|
|||||||
const color0 = this.R5G6B5A0();
|
const color0 = this.R5G6B5A0();
|
||||||
const int1 = this.readR5G6B5Int();
|
const int1 = this.readR5G6B5Int();
|
||||||
const color1 = this.R5G6B5A0();
|
const color1 = this.R5G6B5A0();
|
||||||
const alpha = int0 > int1;
|
const alpha = int0 < int1;
|
||||||
const color2 = alpha
|
const color2 = alpha
|
||||||
? (color0.map(
|
? (color0.map(
|
||||||
(channel0, index) => (channel0 + color1[index]) / 2,
|
(channel0, index) => (channel0 + color1[index]) / 2,
|
||||||
|
|||||||
@@ -96,8 +96,6 @@ export class PvrStream extends BufferStream {
|
|||||||
const header = this.header();
|
const header = this.header();
|
||||||
const metadata = this.metadata();
|
const metadata = this.metadata();
|
||||||
|
|
||||||
console.log(header, metadata);
|
|
||||||
|
|
||||||
if (typeof header.pixelFormat === 'number') {
|
if (typeof header.pixelFormat === 'number') {
|
||||||
switch (header.pixelFormat) {
|
switch (header.pixelFormat) {
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in new issue
Block a user