// Token: 0x0600003B RID: 59 RVA: 0x00002CB8 File Offset: 0x00000EB8 public static global::UnityEngine.RenderTexture GetSceneTexture(bool hdr) { global::SteamVR instance = global::SteamVR.instance; bool flag = instance == null; global::UnityEngine.RenderTexture result; if (flag) { result = null; } else { int num = (int)(instance.sceneWidth * global::SteamVR_Camera.sceneResolutionScale); int num2 = (int)(instance.sceneHeight * global::SteamVR_Camera.sceneResolutionScale); int num3 = (global::UnityEngine.QualitySettings.antiAliasing == 0) ? 1 : global::UnityEngine.QualitySettings.antiAliasing; global::UnityEngine.RenderTextureFormat renderTextureFormat = hdr ? 2 : 0; bool flag2 = global::SteamVR_Camera._sceneTexture != null; if (flag2) { bool flag3 = global::SteamVR_Camera._sceneTexture.width != num || global::SteamVR_Camera._sceneTexture.height != num2 || global::SteamVR_Camera._sceneTexture.antiAliasing != num3 || global::SteamVR_Camera._sceneTexture.format != renderTextureFormat; if (flag3) { global::UnityEngine.Debug.Log(string.Format("Recreating scene texture.. Old: {0}x{1} MSAA={2} [{3}] New: {4}x{5} MSAA={6} [{7}]", new object[] { global::SteamVR_Camera._sceneTexture.width, global::SteamVR_Camera._sceneTexture.height, global::SteamVR_Camera._sceneTexture.antiAliasing, global::SteamVR_Camera._sceneTexture.format, num, num2, num3, renderTextureFormat })); global::UnityEngine.Object.Destroy(global::SteamVR_Camera._sceneTexture); global::SteamVR_Camera._sceneTexture = null; } } bool flag4 = global::SteamVR_Camera._sceneTexture == null; if (flag4) { global::SteamVR_Camera._sceneTexture = new global::UnityEngine.RenderTexture(num, num2, 24, renderTextureFormat); global::SteamVR_Camera._sceneTexture.antiAliasing = num3; global::Valve.VR.EColorSpace colorSpace = (hdr && global::UnityEngine.QualitySettings.activeColorSpace == null) ? global::Valve.VR.EColorSpace.Gamma : global::Valve.VR.EColorSpace.Auto; global::SteamVR.Unity.SetColorSpace(colorSpace); } result = global::SteamVR_Camera._sceneTexture; } return(result); }
public static extern void SetColorSpace(global::Valve.VR.EColorSpace eColorSpace);
// Token: 0x060001A2 RID: 418 RVA: 0x0000C818 File Offset: 0x0000AA18 public global::Valve.VR.EVROverlayError GetOverlayTextureColorSpace(ulong ulOverlayHandle, ref global::Valve.VR.EColorSpace peTextureColorSpace) { return(this.FnTable.GetOverlayTextureColorSpace(ulOverlayHandle, ref peTextureColorSpace)); }
// Token: 0x060001C0 RID: 448 RVA: 0x0000CCD4 File Offset: 0x0000AED4 public global::Valve.VR.EVROverlayError GetOverlayTexture(ulong ulOverlayHandle, ref global::System.IntPtr pNativeTextureHandle, global::System.IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref global::Valve.VR.EGraphicsAPIConvention pAPI, ref global::Valve.VR.EColorSpace pColorSpace) { pWidth = 0U; pHeight = 0U; pNativeFormat = 0U; return(this.FnTable.GetOverlayTexture(ulOverlayHandle, ref pNativeTextureHandle, pNativeTextureRef, ref pWidth, ref pHeight, ref pNativeFormat, ref pAPI, ref pColorSpace)); }
// Token: 0x060001A1 RID: 417 RVA: 0x0000C7F0 File Offset: 0x0000A9F0 public global::Valve.VR.EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle, global::Valve.VR.EColorSpace eTextureColorSpace) { return(this.FnTable.SetOverlayTextureColorSpace(ulOverlayHandle, eTextureColorSpace)); }