8000 Support ktx2 hdr by gz65555 · Pull Request #2587 · galacean/engine · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support ktx2 hdr #2587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 37 additions & 30 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { compare } from "odiff-bin";

const path = require("path");
const fs = require("fs-extra");
const { ChildProcess, spawn } = require("child_process");

const downloadDirectory = path.join(__dirname, "e2e/downloads");
let isRunningInCommandLine = false;
Expand All @@ -19,9 +20,14 @@ export default defineConfig({
videosFolder: "e2e/videos",
specPattern: "e2e/tests/*.cy.ts",
downloadsFolder: "e2e/downloads",
experimentalInteractiveRunEvents: true,
video: false,
setupNodeEvents(on, config) {
// implement node event listeners here
const server = spawn("npm", ["run", "e2e:case"], { stdio: "inherit" });
on("after:run", () => {
console.log("Shutting down test server...");
if (server) server.kill();
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on("before:browser:launch", (browser, launchOptions) => {
console.log("launching browser %s is headless? %s", browser.name, browser.isHeadless);
// supply the absolute path to an unpacked extension's folder
Expand All @@ -38,40 +44,41 @@ export default defineConfig({
isRunningInCommandLine = true;
}
launchOptions.args.push("--force-device-scale-factor=1");

return launchOptions;
}),
on("task", {
async compare({ fileName, options }) {
const baseFolder = "e2e/fixtures/originImage/";
const newFolder = path.join("e2e/downloads");
const diffFolder = path.join("e2e/diff", options.specFolder);
if (!fs.existsSync(diffFolder)) {
fs.mkdirSync(diffFolder, { recursive: true });
}
const baseImage = path.join(baseFolder, fileName);
const newImage = path.join(newFolder, fileName);
const diffImage = path.join(diffFolder, fileName);
console.log("comparing base image %s to the new image %s", baseImage, newImage);
if (options) {
console.log("odiff options %o", options);
}
const started = +new Date();
});
on("task", {
async compare({ fileName, options }) {
const baseFolder = "e2e/fixtures/originImage/";
const newFolder = path.join("e2e/downloads");
const diffFolder = path.join("e2e/diff", options.specFolder);
if (!fs.existsSync(diffFolder)) {
fs.mkdirSync(diffFolder, { recursive: true });
}
const baseImage = path.join(baseFolder, fileName);
const newImage = path.join(newFolder, fileName);
const diffImage = path.join(diffFolder, fileName);
console.log("comparing base image %s to the new image %s", baseImage, newImage);
if (options) {
console.log("odiff options %o", options);
}
const started = +new Date();

const result = await compare(baseImage, newImage, diffImage, options);
const finished = +new Date();
const elapsed = finished - started;
console.log("odiff took %dms", elapsed);
const result = await compare(baseImage, newImage, diffImage, options);
const finished = +new Date();
const elapsed = finished - started;
console.log("odiff took %dms", elapsed);

//@ts-ignore
if (result.match === false && result.diffPercentage <= 0.1) {
//@ts-ignore
if (result.match === false && result.diffPercentage <= 0.1) {
//@ts-ignore
result.match = true;
}

console.log(result);
return result;
result.match = true;
}
});

console.log(result);
return result;
}
});
}
},
chromeWebSecurity: false
Expand Down
Binary file added e2e/.dev/public/autumn_field_puresky_1k.ktx2
Binary file not shown.
55 changes: 55 additions & 0 deletions e2e/case/texture-hdr-ktx2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this e2e test to config.ts and upload fixtures

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The document might is obesolete, Would you please update it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @title HDR KTX2
* @category Texture
*/
import {
BloomEffect,
Camera,
DirectLight,
Logger,
MeshRenderer,
PostProcess,
PrimitiveMesh,
Texture2D,
TonemappingEffect,
UnlitMaterial,
Vector3,
WebGLEngine
} from "@galacean/engine";
import { OrbitControl } from "@galacean/engine-toolkit";
import { initScreenshot, updateForE2E } from "./.mockForE2E";

Check warning on line 20 in e2e/case/texture-hdr-ktx2.ts

View check run for this annotation

Codecov / codecov/patch

e2e/case/texture-hdr-ktx2.ts#L18-L20

Added lines #L18 - L20 were not covered by tests

Logger.enable();

Check warning on line 22 in e2e/case/texture-hdr-ktx2.ts

View check run for this annotation

Codecov / codecov/patch

e2e/case/texture-hdr-ktx2.ts#L22

Added line #L22 was not covered by tests

WebGLEngine.create({ canvas: "canvas", ktx2Loader: { workerCount: 0 } }).then((engine) => {
engine.canvas.resizeByClientSize(2);
const scene = engine.sceneManager.activeScene;
const rootEntity = scene.createRootEntity();

Check warning on line 27 in e2e/case/texture-hdr-ktx2.ts

View check run for this annotation

Codecov / codecov/patch

e2e/case/texture-hdr-ktx2.ts#L24-L27

Added lines #L24 - L27 were not covered by tests

// camera
const cameraEntity = rootEntity.createChild("camera_node");
cameraEntity.transform.position = new Vector3(0, 1, 5);
const camera = cameraEntity.addComponent(Camera);
cameraEntity.addComponent(OrbitControl).target = new Vector3(0, 0, 0);

Check warning on line 33 in e2e/case/texture-hdr-ktx2.ts

View check run for this annotation

Codecov / codecov/patch

e2e/case/texture-hdr-ktx2.ts#L30-L33

Added lines #L30 - L33 were not covered by tests

const lightNode = rootEntity.createChild("light_node");
lightNode.addComponent(DirectLight).intensity = 0.6;
lightNode.transform.lookAt(new Vector3(0, 0, 1));
lightNode.transform.rotate(new Vector3(0, 90, 0));

Check warning on line 38 in e2e/case/texture-hdr-ktx2.ts

View check run for this annotation

Codecov / codecov/patch

e2e/case/texture-hdr-ktx2.ts#L35-L38

Added lines #L35 - L38 were not covered by tests

const planeEntity = rootEntity.createChild("plane");
const meshRenderer = planeEntity.addComponent(MeshRenderer);
meshRenderer.mesh = PrimitiveMesh.createCuboid(engine);
const mtl = new UnlitMaterial(engine);
meshRenderer.setMaterial(mtl);
const postProcess = rootEntity.addComponent(PostProcess);
postProcess.addEffect(BloomEffect);
postProcess.addEffect(TonemappingEffect);

Check warning on line 47 in e2e/case/texture-hdr-ktx2.ts

View check run for this annotation

Codecov / codecov/patch

e2e/case/texture-hdr-ktx2.ts#L40-L47

Added lines #L40 - L47 were not covered by tests

engine.resourceManager.load<Texture2D>("/autumn_field_puresky_1k.ktx2").then((tex) => {
mtl.baseTexture = tex;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add Bloom or Tonemapping to test HDR color space

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

updateForE2E(engine);

Check warning on line 51 in e2e/case/texture-hdr-ktx2.ts

View check run for this annotation

Codecov / codecov/patch

e2e/case/texture-hdr-ktx2.ts#L49-L51

Added lines #L49 - L51 were not covered by tests

initScreenshot(engine, camera);
});
});

Check warning on line 55 in e2e/case/texture-hdr-ktx2.ts

View check run for this annotation

Codecov / codecov/patch

e2e/case/texture-hdr-ktx2.ts#L53-L55

Added lines #L53 - L55 were not covered by tests
5 changes: 5 additions & 0 deletions e2e/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@
category: "Texture",
caseFileName: "texture-R8G8",
threshold: 0.1
},
KTX2HDR: {
category: "Texture",
caseFileName: "texture-hdr-ktx2",
threshold: 0.1

Check warning on line 153 in e2e/config.ts

View check run for this annotation

Codecov / codecov/patch

e2e/config.ts#L149-L153

Added lines #L149 - L153 were not covered by tests
}
},
Shadow: {
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/texture/enums/TextureFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ export enum TextureFormat {
R8 = 36,
/** RG float format, 8 bits per channel. */
R8G8 = 37,

/** RGB compressed format, 4 bits per pixel. */
BC1 = 10,
/** RGBA compressed format, 8 bits per pixel. */
BC3 = 11,
/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
BC7 = 12,
/** RGB HDR compressed format, 8 bits per pixel.. */
BC6H = 100,
/** RGB compressed format, 4 bits per pixel. */
ETC1_RGB = 13,
/** RGB compressed format, 4 bits per pixel. */
Expand Down
2 changes: 1 addition & 1 deletion packages/loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export * from "./SceneLoader";
export type { Texture2DParams } from "./Texture2DLoader";
export { parseSingleKTX } from "./compressed-texture";
export * from "./gltf";
export { KTX2Loader, KTX2Transcoder } from "./ktx2/KTX2Loader";
export { KTX2Loader } from "./ktx2/KTX2Loader";
export { KTX2TargetFormat } from "./ktx2/KTX2TargetFormat";
export * from "./resource-deserialize";
export * from "./prefab/PrefabResource";
9 changes: 5 additions & 4 deletions packages/loader/src/ktx2/KTX2Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ export enum DFDTransferFunction {
sRGB = 2
}

enum ColorModel {
export enum ColorModel {
ETC1S = 163,
UASTC = 166
UASTC_LDR_4X4 = 166,
UASTC_HDR_4X4 = 167
}

export enum SupercompressionScheme {
Expand Down Expand Up @@ -52,8 +53,8 @@ export class KTX2Container {
return this.dataFormatDescriptor.transferFunction === DFDTransferFunction.sRGB;
}

get isUASTC() {
return this.dataFormatDescriptor.colorModel === ColorModel.UASTC;
get colorModel(): ColorModel {
return this.dataFormatDescriptor.colorModel;
}

private parse(data: Uint8Array) {
Expand Down
81 changes: 32 additions & 49 deletions packages/loader/src/ktx2/KTX2Loader.ts
A076
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,30 @@
resourceLoader
} from "@galacean/engine-core";
import { MathUtil } from "@galacean/engine-math";
import { DFDTransferFunction, KTX2Container } from "./KTX2Container";
import { DFDTransferFunction, KTX2Container, ColorModel } from "./KTX2Container";
import { KTX2TargetFormat } from "./KTX2TargetFormat";
import { TranscodeResult } from "./transcoder/AbstractTranscoder";
import { BinomialLLCTranscoder } from "./transcoder/BinomialLLCTranscoder";
import { KhronosTranscoder } from "./transcoder/KhronosTranscoder";

@resourceLoader(AssetType.KTX2, ["ktx2"])
export class KTX2Loader extends Loader<Texture2D | TextureCube> {
private static _isBinomialInit: boolean = false;
private static _binomialLLCTranscoder: BinomialLLCTranscoder;
private static _khronosTranscoder: KhronosTranscoder;
private static _priorityFormats = {
etc1s: [
[ColorModel.ETC1S]: [
KTX2TargetFormat.ETC,
KTX2TargetFormat.BC7,
KTX2TargetFormat.ASTC,
KTX2TargetFormat.BC1_BC3,
KTX2TargetFormat.PVRTC
],
uastc: [
[ColorModel.UASTC_LDR_4X4]: [
KTX2TargetFormat.ASTC,
KTX2TargetFormat.BC7,
KTX2TargetFormat.ETC,
KTX2TargetFormat.BC1_BC3,
KTX2TargetFormat.PVRTC
]
],
[ColorModel.UASTC_HDR_4X4]: [KTX2TargetFormat.BC6H, KTX2TargetFormat.R16G16B16A16]
};
private static _capabilityMap = {
[KTX2TargetFormat.ASTC]: {
Expand All @@ -59,6 +57,14 @@
[DFDTransferFunction.linear]: [GLCapabilityType.s3tc],
[DFDTransferFunction.sRGB]: [GLCapabilityType.s3tc_srgb]
},
[KTX2TargetFormat.BC6H]: {
[DFDTransferFunction.linear]: [GLCapabilityType.bptc],
[DFDTransferFunction.sRGB]: [GLCapabilityType.bptc]
},
[KTX2TargetFormat.R16G16B16A16]: {
[DFDTransferFunction.linear]: [GLCapabilityType.textureHalfFloatLinear],
[DFDTransferFunction.sRGB]: [GLCapabilityType.textureHalfFloat]
},
[KTX2TargetFormat.PVRTC]: { [DFDTransferFunction.linear]: [GLCapabilityType.pvrtc, GLCapabilityType.pvrtc_webkit] }
};

Expand All @@ -68,35 +74,27 @@
*/
static release(): void {
if (this._binomialLLCTranscoder) this._binomialLLCTranscoder.destroy();
if (this._khronosTranscoder) this._khronosTranscoder.destroy();
this._binomialLLCTranscoder = null;
this._khronosTranscoder = null;
this._isBinomialInit = false;
}

/** @internal */
static _parseBuffer(buffer: Uint8Array, engine: Engine, params?: KTX2Params) {
const ktx2Container = new KTX2Container(buffer);
const formatPriorities =
params?.priorityFormats ?? KTX2Loader._priorityFormats[ktx2Container.isUASTC ? "uastc" : "etc1s"];
const formatPriorities = params?.priorityFormats ?? KTX2Loader._priorityFormats[ktx2Container.colorModel];
const targetFormat = KTX2Loader._decideTargetFormat(engine, ktx2Container, formatPriorities);
let transcodeResultPromise: Promise<TranscodeResult>;
if (KTX2Loader._isBinomialInit || !KhronosTranscoder.transcoderMap[targetFormat] || !ktx2Container.isUASTC) {
const binomialLLCWorker = KTX2Loader._getBinomialLLCTranscoder();
transcodeResultPromise = binomialLLCWorker.init().then(() => binomialLLCWorker.transcode(buffer, targetFormat));
} else {
const khronosWorker = KTX2Loader._getKhronosTranscoder();
transcodeResultPromise = khronosWorker.init().then(() => khronosWorker.transcode(ktx2Container));
}
return transcodeResultPromise.then((result) => {
return {
ktx2Container,
engine,
result,
targetFormat,
params: ktx2Container.keyValue["GalaceanTextureParams"] as Uint8Array
};
});
const binomialLLCWorker = KTX2Loader._getBinomialLLCTranscoder();
return binomialLLCWorker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete EngineConfiguration.ktx2Loader.transcoder

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

.init()
.then(() => binomialLLCWorker.transcode(buffer, targetFormat))
.then((result) => {
return {
ktx2Container,
engine,
result,
targetFormat,
params: ktx2Container.keyValue["GalaceanTextureParams"] as Uint8Array
};
});
}

/** @internal */
Expand Down Expand Up @@ -190,14 +188,9 @@
}

private static _getBinomialLLCTranscoder(workerCount: number = 4) {
KTX2Loader._isBinomialInit = true;
return (this._binomialLLCTranscoder ??= new BinomialLLCTranscoder(workerCount));
}

private static _getKhronosTranscoder(workerCount: number = 4) {
return (this._khronosTranscoder ??= new KhronosTranscoder(workerCount, KTX2TargetFormat.ASTC));
}

private static _getEngineTextureFormat(
basisFormat: KTX2TargetFormat,
transcodeResult: TranscodeResult
Expand All @@ -216,6 +209,10 @@
return hasAlpha ? TextureFormat.PVRTC_RGBA4 : TextureFormat.PVRTC_RGB4;
case KTX2TargetFormat.R8G8B8A8:
return TextureFormat.R8G8B8A8;
case KTX2TargetFormat.BC6H:
return TextureFormat.BC6H;

Check warning on line 213 in packages/loader/src/ktx2/KTX2Loader.ts

View check run for this annotation

Codecov / codecov/patch

packages/loader/src/ktx2/KTX2Loader.ts#L213

Added line #L213 was not covered by tests
case KTX2TargetFormat.R16G16B16A16:
return TextureFormat.R16G16B16A16;

Check warning on line 215 in packages/loader/src/ktx2/KTX2Loader.ts

View check run for this annotation

Codecov / codecov/patch

packages/loader/src/ktx2/KTX2Loader.ts#L215

Added line #L215 was not covered by tests
Comment on lines +212 to +215
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Added support for HDR texture formats but missing test coverage.

The new texture formats for HDR support (BC6H and R16G16B16A16) have been properly added to the _getEngineTextureFormat method, but these lines lack test coverage according to the static analysis.

Please ensure that you add unit tests to cover these new format mappings. Here's a suggestion for a test:

// Add this to the appropriate test file
it("should map BC6H and R16G16B16A16 to the correct engine formats", () => {
  // Mock transcodeResult
  const transcodeResult = { hasAlpha: false } as TranscodeResult;
  
  // Test 
10000
BC6H mapping
  const bc6hFormat = KTX2Loader["_getEngineTextureFormat"](KTX2TargetFormat.BC6H, transcodeResult);
  expect(bc6hFormat).toBe(TextureFormat.BC6H);
  
  // Test R16G16B16A16 mapping
  const r16Format = KTX2Loader["_getEngineTextureFormat"](KTX2TargetFormat.R16G16B16A16, transcodeResult);
  expect(r16Format).toBe(TextureFormat.R16G16B16A16);
});

🏁 Script executed:

#!/bin/bash
# Search for any existing tests referencing KTX2Loader
rg -n 'KTX2Loader' -g '*.spec.ts'
# Search for BC6H references in test files
rg -n 'BC6H' -g '*.spec.ts'
# Search for R16G16B16A16 references in test files
rg -n 'R16G16B16A16' -g '*.spec.ts'

Length of output: 544


🏁 Script executed:

#!/bin/bash
# List all test files in the repository
fd --extension ts --extension js | grep -E '\.(test|spec)\.(ts|js)$' || echo "No test files found"

Length of output: 3321


🏁 Script executed:

#!/bin/bash
rg -n 'BC6H' tests/src/loader/KTX2Loader.test.ts
rg -n 'R16G16B16A16' tests/src/loader/KTX2Loader.test.ts
rg -n '_getEngineTextureFormat' tests/src/loader/KTX2Loader.test.ts

Length of output: 173


Add unit tests for HDR texture format mappings

The new mappings for KTX2TargetFormat.BC6H and KTX2TargetFormat.R16G16B16A16 in KTX2Loader._getEngineTextureFormat are not covered by existing tests. Please add coverage in tests/src/loader/KTX2Loader.test.ts:

• File to update: tests/src/loader/KTX2Loader.test.ts

Suggested test addition:

import { KTX2Loader } from "../../../packages/loader/src/ktx2/KTX2Loader";
import { KTX2TargetFormat } from "../../../packages/loader/src/ktx2/KTX2Interfaces";
import { TextureFormat } from "@your-engine/core";

describe("KTX2Loader _getEngineTextureFormat", () => {
  const dummyResult = { hasAlpha: false } as any;

  it("maps BC6H to TextureFormat.BC6H", () => {
    const format = (KTX2Loader as any)["_getEngineTextureFormat"](
      KTX2TargetFormat.BC6H,
      dummyResult,
    );
    expect(format).toBe(TextureFormat.BC6H);
  });

  it("maps R16G16B16A16 to TextureFormat.R16G16B16A16", () => {
    const format = (KTX2Loader as any)["_getEngineTextureFormat"](
      KTX2TargetFormat.R16G16B16A16,
      dummyResult,
    );
    expect(format).toBe(TextureFormat.R16G16B16A16);
  });
});
🧰 Tools
🪛 GitHub Check: codecov/patch

[warning] 209-209: packages/loader/src/ktx2/KTX2Loader.ts#L209
Added line #L209 was not covered by tests


[warning] 211-211: packages/loader/src/ktx2/KTX2Loader.ts#L211
Added line #L211 was not covered by tests

}
}

Expand All @@ -227,11 +224,7 @@
KTX2Loader._priorityFormats["uastc"] = options.priorityFormats;
}

if (options.transcoder === KTX2Transcoder.Khronos) {
return KTX2Loader._getKhronosTranscoder(options.workerCount).init();
} else {
return KTX2Loader._getBinomialLLCTranscoder(options.workerCount).init();
}
return KTX2Loader._getBinomialLLCTranscoder(options.workerCount).init();

Check warning on line 227 in packages/loader/src/ktx2/KTX2Loader.ts

View check run for this annotation

Codecov / codecov/patch

packages/loader/src/ktx2/KTX2Loader.ts#L227

Added line #L227 was not covered by tests
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Simplified initialization but missing test coverage.

The initialization now always uses _getBinomialLLCTranscoder, which is a good simplification. However, this line lacks test coverage according to the static analysis.

Please add a unit test to verify the initialization behavior:

// Add this to the appropriate test file
it("should properly initialize BinomialLLCTranscoder with the configured worker count", async () => {
  const engine = {} as Engine;
  const config = {
    ktx2Loader: {
      workerCount: 2
    }
  } as EngineConfiguration;
  
  const getBinomialSpy = jest.spyOn(KTX2Loader as any, '_getBinomialLLCTranscoder');
  const mockTranscoder = { init: jest.fn().mockResolvedValue(undefined) };
  getBinomialSpy.mockReturnValue(mockTranscoder);
  
  await loader.initialize(engine, config);
  
  expect(getBinomialSpy).toHaveBeenCalledWith(2);
  expect(mockTranscoder.init).toHaveBeenCalled();
  
  getBinomialSpy.mockRestore();
});
🧰 Tools
🪛 GitHub Check: codecov/patch

[warning] 223-223: packages/loader/src/ktx2/KTX2Loader.ts#L223
Added line #L223 was not covered by tests

}
}

Expand Down Expand Up @@ -268,14 +261,6 @@
priorityFormats: KTX2TargetFormat[];
}

/** Used for initialize KTX2 transcoder. */
export enum KTX2Transcoder {
/** BinomialLLC transcoder. */
BinomialLLC,
/** Khronos transcoder. */
Khronos
}

declare module "@galacean/engine-core" {
interface EngineConfiguration {
/** KTX2 loader options. If set this option and workCount is great than 0, workers will be created. */
Expand All @@ -285,8 +270,6 @@
/** Global transcoding format queue which will be used if not specified in per-instance param, default is BC7/ASTC/BC3_BC1/ETC/PVRTC/R8G8B8A8. */
/** @deprecated */
priorityFormats?: KTX2TargetFormat[];
/** Used for initialize KTX2 transcoder, default is BinomialLLC. */
transcoder?: KTX2Transcoder;
};
}
}
6 changes: 5 additions & 1 deletion packages/loader/src/ktx2/KTX2TargetFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ export enum KTX2TargetFormat {
/** RG format, 16 bits per pixel. */
R8G8,
/** RGBA format, 32 bits per pixel. */
R8G8B8A8
R8G8B8A8,
/** RGB HDR compressed format, 8 bits per pixel. */
BC6H,
/** RGBA format, 16 bits per channel. */
R16G16B16A16
}
Loading
Loading
0