aboutsummaryrefslogtreecommitdiff
path: root/cube/cube.c
diff options
context:
space:
mode:
authorKaren Webb <karen.webb@umbralsoftware.co.uk>2025-01-22 02:32:23 +0000
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2025-01-21 20:31:17 -0700
commit8e675c28b8b47fd763e2c1e080cb78aaa4e1736a (patch)
tree9f9932b04317a9ee5fdbf4cdc7652830c829f134 /cube/cube.c
parent26c7bde34a4a253004af427d92b27656e386effc (diff)
downloadusermoji-8e675c28b8b47fd763e2c1e080cb78aaa4e1736a.tar.xz
cube: Correctly apply sRGB OETF/EOTF
Diffstat (limited to 'cube/cube.c')
-rw-r--r--cube/cube.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cube/cube.c b/cube/cube.c
index 3c6d3293..349bfc74 100644
--- a/cube/cube.c
+++ b/cube/cube.c
@@ -1728,7 +1728,7 @@ static void demo_prepare_texture_buffer(struct demo *demo, const char *filename,
static void demo_prepare_texture_image(struct demo *demo, const char *filename, struct texture_object *tex_obj,
VkImageTiling tiling, VkImageUsageFlags usage, VkFlags required_props) {
- const VkFormat tex_format = VK_FORMAT_R8G8B8A8_UNORM;
+ const VkFormat tex_format = VK_FORMAT_R8G8B8A8_SRGB;
int32_t tex_width;
int32_t tex_height;
VkResult U_ASSERT_ONLY err;
@@ -1813,7 +1813,7 @@ static void demo_destroy_texture(struct demo *demo, struct texture_object *tex_o
}
static void demo_prepare_textures(struct demo *demo) {
- const VkFormat tex_format = VK_FORMAT_R8G8B8A8_UNORM;
+ const VkFormat tex_format = VK_FORMAT_R8G8B8A8_SRGB;
VkFormatProperties props;
uint32_t i;
@@ -1870,8 +1870,8 @@ static void demo_prepare_textures(struct demo *demo) {
demo_pop_cb_label(demo, demo->cmd); // "StagingTexture"
} else {
- /* Can't support VK_FORMAT_R8G8B8A8_UNORM !? */
- assert(!"No support for R8G8B8A8_UNORM as texture image format");
+ /* Can't support VK_FORMAT_R8G8B8A8_SRGB !? */
+ assert(!"No support for R8G8B8A8_SRGB as texture image format");
}
const VkSamplerCreateInfo sampler = {