Describe the bug
When a color texture is attached to a material, the texture is flagged as sRGB encoded.
However, sRGB format is only supported on 8-bits RGB(A) formats so the flag is ignored on 16-bits textures.
To Reproduce
Steps to reproduce the behavior:
- Open the file using
f3d --no-config testing/data/16bit.png
- Compare colors with another image viewer
Expected behavior
A new vtkF3DLinearColorSpaceFilter should be added and plugged between the image reader and vtkTexture when sRGB format is requested.
The filter should be a no-op for types other than VTK_SHORT and VTK_UNSIGNED_SHORT.
Internally, the channel should be converted to a float (e.g. by dividing by 65535 for unsigned shorts), apply the formula pow(value, 2.2), and convert back to it's original type.
System Information:
N/A
F3D Information
N/A
Additional context
N/A
Describe the bug
When a color texture is attached to a material, the texture is flagged as sRGB encoded.
However, sRGB format is only supported on 8-bits RGB(A) formats so the flag is ignored on 16-bits textures.
To Reproduce
Steps to reproduce the behavior:
f3d --no-config testing/data/16bit.pngExpected behavior
A new
vtkF3DLinearColorSpaceFiltershould be added and plugged between the image reader andvtkTexturewhen sRGB format is requested.The filter should be a no-op for types other than
VTK_SHORTandVTK_UNSIGNED_SHORT.Internally, the channel should be converted to a float (e.g. by dividing by 65535 for unsigned shorts), apply the formula
pow(value, 2.2), and convert back to it's original type.System Information:
N/A
F3D Information
N/A
Additional context
N/A