KhronosGroup / KhronosGroup/Vulkan-Docs
Is the linear transfer function defined for values outside of [0, 1)?
@fluppeteer is already working on this.
Since Jul 30, 2025.
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
According to ITU-T H.273 Table 3, what they call the "linear transfer function" is only defined for values within [0, 1). Does the Vulkan definition match this? The Khronos Data Format Specification makes me think that it does not:
a linear transfer function: for color data, there is a linear relationship between numerical pixel values and the intensity of additive colors
for this to be true always, the valid range must be all reals. Unless there is something else qualifying this which I am missing.
As an example, it seems like something on Linux (not super familiar with this part of the stack -- don't know if this is handled on my machine by Mesa or Gnome) assumes that the linear transfer function extends to values beyond [0, 1). If I present with COLOR_SPACE_BT709_LINEAR_EXT, I get different results (more significant than just quantization differences) based on whether my underlying format is FORMAT_A2B10G10R10_UNORM_PACK32 or FORMAT_R16G16B16A16_SFLOAT. I can make the two cases behave identical by clamping the values I write into the swapchain to [0, 1]. Thus it seems like the floating point format treats values greater than [0, 1) as meaningful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.