Hotrian / HeadlessOverlayToolkit

Create Cross Application OpenVR Overlays! Made with Unity.
59 stars 16 forks source link

How did you deal with RenderTextures being so dark? #7

Open BenWoodford opened 7 years ago

BenWoodford commented 7 years ago

I wrote my own library for dashboard overlays for other purposes, but I'm stuck on one issue that I can't seem to get around:

The overlay is very dark in VR. The RenderTexture is a bit dark in the editor but not nearly as dark as it is in the overlay. Did you ever manage to find a way to resolve that? With the lack of SetOverlayGamma in the C# API there's not much I can think of at this point.

Hotrian commented 7 years ago

Actually, I don't think I ever had this issue. IIRC I actually had the reverse issue where textures seemed too bright or washed out in VR.

First I would make sure you were using the correct shader - since you likely want your textures sent to SteamVR without any kind of lighting or shadows, I would make sure you were using the Shader Unlit/Textured on your material, and that shadows are turned off on it.

Next, I would go to Edit > Project Settings > Player and make sure Color Space is set to Gamma. SteamVR for some reason sets this to Linear by default, which is what was causing my textures to appear washed out or too bright.

With these settings the Source Video and Overlay look the same. Left is Source Video, right is the Overlay as seen through the Headset Window.

Edit: Though they might look slightly different due to the way SteamVR is drawing Overlays, they look very similar, which is just fine for my usage.

BenWoodford commented 7 years ago

I'm using Unity's UI stuff so they should all be unlit anyway. It's for an application that switches from being a VR environment to another scene that provides an overlay, interestingly it's actually a lot brighter but still loses some of the contrast when I load up the VR scene and switch to the overlay scene, whereas going directly into the overlay scene it's a lot darker - weird. Probably something Steam VR does.