Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IVRCompositor::SetGamma is missing and setting linear gamma is not working #66

Open
TheWhiteAmbit opened this issue Mar 25, 2016 · 6 comments
Assignees

Comments

@TheWhiteAmbit
Copy link

The described compositor setting is completely missing in the sources, attempt to set linear gamma by hand via

vr::ColorSpace_Linear;

will not render at all (at least with DirectX). Currently using workaround with vr::ColorSpace_Gamma and shader.

@aleiby
Copy link
Contributor

aleiby commented Mar 25, 2016

What texture format are you using? Are you not seeing any visual difference in the headset when changing the color space, or are you getting an error?

@TheWhiteAmbit
Copy link
Author

The "SetGamma" method is missing completely:
https://github.com/ValveSoftware/openvr/wiki/IVRCompositor::SetGamma

Beside this, the picture is remaining completely black when I set color space from ColorSpace_Gamma to ColorSpace_Linear. My Texture-Format is the following, but I have tried different options (including float and non-sRGB). Right now I am seeing it on a Rift DK2, but it was the same on the Vive Pre.

tdesc.SampleDesc.Count = 1;
tdesc.SampleDesc.Quality = 0;
tdesc.Usage = D3D11_USAGE_DEFAULT;
tdesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
tdesc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET;

@ekmett
Copy link

ekmett commented Sep 6, 2016

I'm also getting this issue. If I submit in Gamma space what I see on the display matches what I get in the screen, yet if I submit in Linear space what I see on the vive display matches what i get on the screen in the compositor. I can't see a difference for toggling this.

As a result both the compositor and and screen look too dark when I say 'linear' and try to get OpenVR to apply the gamma curve for me, leaving me to apply the gamma curve as part of my tonemapping pass.

I was looking to use glEnable(GL_FRAMEBUFFER_SRGB) at the end in my companion window and switch to linear for eye submission to avoid an admittedly miniscule amount of work.

@ekmett
Copy link

ekmett commented Sep 6, 2016

In the above case I was submitting a "linear" GL_RGBA8 texture as vr::ColorSpace_Linear.

Possibly related is that the documentation mentions that ColorSpace_Auto will pick based on if the resolve texture is 8 bits or floating point, but if I try to switch to submitting a GL_RGBA16F texture under ColorSpace_Auto it doesn't work and I just get a black compositor window.

Is perhaps the OpenGL side of the code path bit rotted or limited in the formats it will accept for each colorspace?

@TheWhiteAmbit
Copy link
Author

This is propably not OpenGL related, since it also happens in Direct3D. The internal handling on Windows should be all Direct3D, so this seems to be also present with not OpenGL involved. Direc3D has explicit linar and sRGB texture formats, but also supports Typeless. It worked with none as expected.

@TheWhiteAmbit
Copy link
Author

Just checked it with release 1.0.16 - still not resolved :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants