Hello,
I have a problem with displayed RGB colors.
When I’m creating render target for OpenXR:
swapchain_info.format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
(if I try to create it with DXGI_FORMAT_R8G8B8A8_UNORM
, it will fail and run program in windowed mode instead)
When I’m creating render target for windowed mode:
FrameTextureDescriptor.Format = DXGI_FORMAT_R8G8B8A8_UNORM
(with DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
output colors are the same)
The problem:
displayed colors in windowed mode are miles away from colors inside headset.
I know that Virtual Desktop Streamer changes colors a bit (I turned vibrant colors on and off, but that is not the core of the problem).
In headset colors are PINKISH. Gray color is not gray, it has a pink hue (while gray on desktop is gray). Inside the headset lenses everything is so obnoxiously pink, that I had to create a final color correction in pixel shader to fix this (it has essentially a blue bias).
However, if i make a VIDEO inside a headset:
- with pixel shader color correction, video will be masively blue, while displayed colors in the lenses will be nice
- if I turn final PS color correction off, then video from headset will be fine, but the image in lenses will be pinkish
Video from headset without color correction is here: https://www.youtube.com/shorts/m2B_tD4wSYw
Video from headset with color correction is here:https://www.youtube.com/shorts/hPjuSrZxPQ4
Image through lenses without color correction is here (taken with phone, that’s the best I can do).
Notice the ICP panel below head up display. The ICP keys (0-9) should be gray, and other gray structures in the cockpit should be gray, but are pink.
Through the lenses, with no color correction, gray is pink.
In video with no color correction, gray is gray.
Through lenses with color correction, gray and other colors are “relatively” fixed, but colors thne broken in video.
I haven’t found any workaround for this except to make color correction for headset.
When I was investigating the problem, I created a surface in front of my eyes that I could change its color by setting RGB 0…1 with keys. In that way I was looking for known RGB combination and observing what colors I actually see. Then I went and made color correction curves to fix colors according to their RGB input - to fix gray to be actually gray, magenta to be magenta, yellow to be yellow etc. Black and white are no problem because they are actually saturated, so are pure R or G or B not problematic as they are anyway saturated. Problematic are combinations of RGB when values are between 0 and 1.
(with no color correction:)
What I noticed was:
RED color: 0 = black, 0.65 = maximum
if I increased red color above 0.65, color inside lenses did not change any more, it was at maximum, no difference between colors R=0.65 and R=1.00
GREEN color: 0 = black, 0.90 = maximum
if I increased green color above 0.90, color inside lenses did not change any more, it was at maximum
BLUE color, the most broken color in lenses
0 = black, 0.90 = maximum (if I remember correctly)
but blue is underrepresented at values < 1
What that means is, if I input RGB = 0.5, 0.5, 0.5
red will be almost at maximum intensity (0.65 = max), green will be approximately at half, and blue will be less than half visible intensity, making such gray color look pink, because there is too much red and too little blue.
The color correction curves that I came up with are on the image above.
X axis is input value.
Y axis is output value that is needed to achieve a certain color.
It is not a perfect correction. I corrected yellow, magenta, cyan, some gray colors etc… but now in some areas gray is a tiny bit too much blue tint.
As you can see blue has “gamma” curve above neutral “1” line, because I needed more blue value than red or green, to achieve gray output.
Now, if anyone knows where lies the problem.
Did I do something wrong to get wrong colors in headset lenses?
Is there some setting that I do not know of, that is causing this?
Virtual Desktop Streamer has color correction, but it is not the cause of this (even if I turn it off, problem remains).
And the difference is already in headset, video recorded in the headset has different colors than lenses.
Is there any other solution to this other than manual color correction?
Thanks for any answers.