diff options
| author | Karen Webb <karen.webb@umbralsoftware.co.uk> | 2025-01-22 02:32:23 +0000 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2025-01-21 20:31:17 -0700 |
| commit | 8e675c28b8b47fd763e2c1e080cb78aaa4e1736a (patch) | |
| tree | 9f9932b04317a9ee5fdbf4cdc7652830c829f134 /cube/cube.cpp | |
| parent | 26c7bde34a4a253004af427d92b27656e386effc (diff) | |
| download | usermoji-8e675c28b8b47fd763e2c1e080cb78aaa4e1736a.tar.xz | |
cube: Correctly apply sRGB OETF/EOTF
Diffstat (limited to 'cube/cube.cpp')
| -rw-r--r-- | cube/cube.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cube/cube.cpp b/cube/cube.cpp index 61cb4a0e..7d959756 100644 --- a/cube/cube.cpp +++ b/cube/cube.cpp @@ -2594,7 +2594,7 @@ void Demo::prepare_texture_image(const char *filename, texture_object &tex_obj, auto const image_create_info = vk::ImageCreateInfo() .setImageType(vk::ImageType::e2D) - .setFormat(vk::Format::eR8G8B8A8Unorm) + .setFormat(vk::Format::eR8G8B8A8Srgb) .setExtent({tex_obj.tex_width, tex_obj.tex_height, 1}) .setMipLevels(1) .setArrayLayers(1) @@ -2641,7 +2641,7 @@ void Demo::prepare_texture_image(const char *filename, texture_object &tex_obj, } void Demo::prepare_textures() { - vk::Format const tex_format = vk::Format::eR8G8B8A8Unorm; + vk::Format const tex_format = vk::Format::eR8G8B8A8Srgb; vk::FormatProperties props; gpu.getFormatProperties(tex_format, &props); @@ -2689,7 +2689,7 @@ void Demo::prepare_textures() { textures[i].imageLayout, vk::AccessFlagBits::eTransferWrite, vk::PipelineStageFlagBits::eTransfer, vk::PipelineStageFlagBits::eFragmentShader); } else { - assert(!"No support for R8G8B8A8_UNORM as texture image format"); + assert(!"No support for R8G8B8A8_SRGB as texture image format"); } auto const samplerInfo = vk::SamplerCreateInfo() |
