From 38c33c7c4526b7b8c1c9d9e5ce67443c8c07eb48 Mon Sep 17 00:00:00 2001 From: Martin Valigursky <59932779+mvaligursky@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:47:27 +0000 Subject: [PATCH] [Fix] Exposed PIXELFORMAT_R8 format for locking (#7177) Co-authored-by: Martin Valigursky --- src/platform/graphics/constants.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platform/graphics/constants.js b/src/platform/graphics/constants.js index 7a52d8a1627..373df391c57 100644 --- a/src/platform/graphics/constants.js +++ b/src/platform/graphics/constants.js @@ -932,7 +932,7 @@ export const PIXELFORMAT_R16F = 50; export const PIXELFORMAT_RG16F = 51; /** - * 8-bit per-channel unsigned integer (R) format. + * 8-bit per-channel (R) format. * * @type {number} * @category Graphics @@ -940,7 +940,7 @@ export const PIXELFORMAT_RG16F = 51; export const PIXELFORMAT_R8 = 52; /** - * 8-bit per-channel unsigned integer (RG) format. + * 8-bit per-channel (RG) format. * * @type {number} * @category Graphics @@ -1238,6 +1238,7 @@ export const getPixelFormatArrayType = (format) => { case PIXELFORMAT_RGB16F: case PIXELFORMAT_RGBA16F: return Uint16Array; + case PIXELFORMAT_R8: case PIXELFORMAT_R8I: case PIXELFORMAT_RG8I: case PIXELFORMAT_RGBA8I: