Closed oierlauzi closed 4 years ago
Are you sure about this? If I use the SRGB format then the texture looks wrong (different from how it looks in image editors). Is that because the texture loading also needs to be changed?
Yes, you're right. If the texture is encoded as SRGB and then interpreted as linear RGB, both errors cancel out, so there isn't any problem. In most cases this will be OK, and it will be more efficient, as the TMU does not have to do the RGB<->SRGB conversion. However if there is any blending at the scene, color mixing will be done incorrectly
Alright, I'll correct this in the tutorial as soon as possible.
When creating the swap-chain, a
VK_FORMAT_B8G8R8A8_UNORM
format (linear) is used besides an sRGB nonlinear colorspace. As stated in the documentation nonlinear color-spaces must have the appropriate EOTF applied before its presentation. As in this case, this transfer function is not applied, there is a slight color incorrection (interpreting linear RGB data as non-linear RGB data). Therefore, I think its better to use a VK_FORMAT_B8G8R8A8_SRGB format, so that the transfer function is applied automatically by Vulkan