pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
23 lines (20 loc) • 524 B
JavaScript
;
;
const vkFormatToGPUFormatMap = {
23: "rgb8unorm",
// VK_FORMAT_R8G8B8_UNORM
37: "rgba8unorm",
// VK_FORMAT_R8G8B8A8_UNORM
43: "rgba8unorm-srgb"
// VK_FORMAT_R8G8B8A8_SRGB
// TODO add more!
};
function vkFormatToGPUFormat(vkFormat) {
const format = vkFormatToGPUFormatMap[vkFormat];
if (format) {
return format;
}
throw new Error(`Unsupported VkFormat: ${vkFormat}`);
}
exports.vkFormatToGPUFormat = vkFormatToGPUFormat;
//# sourceMappingURL=vkFormatToGPUFormat.js.map