René's URL Explorer Experiment


Title: [Bug/Enhancement] original EnvironmentDepthManager provider causes 90-100% PC GPU usage in Quest Link, while self-implemented sample-and-hold mode stays at 9-11% · Issue #96 · oculus-samples/Unity-DepthAPI · GitHub

Open Graph Title: [Bug/Enhancement] original EnvironmentDepthManager provider causes 90-100% PC GPU usage in Quest Link, while self-implemented sample-and-hold mode stays at 9-11% · Issue #96 · oculus-samples/Unity-DepthAPI

X Title: [Bug/Enhancement] original EnvironmentDepthManager provider causes 90-100% PC GPU usage in Quest Link, while self-implemented sample-and-hold mode stays at 9-11% · Issue #96 · oculus-samples/Unity-DepthAPI

Description: Unity version 6000.0.40 Where does the issue occur? In Unity Editor In Quest builds Description Summary When running in Unity Editor over Quest Link, enabling EnvironmentDepthManager causes sustained PC GPU 3D usage around 90-100%, even ...

Open Graph Description: Unity version 6000.0.40 Where does the issue occur? In Unity Editor In Quest builds Description Summary When running in Unity Editor over Quest Link, enabling EnvironmentDepthManager causes sustain...

X Description: Unity version 6000.0.40 Where does the issue occur? In Unity Editor In Quest builds Description Summary When running in Unity Editor over Quest Link, enabling EnvironmentDepthManager causes sustain...

Opengraph URL: https://github.com/oculus-samples/Unity-DepthAPI/issues/96

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug/Enhancement] original EnvironmentDepthManager provider causes 90-100% PC GPU usage in Quest Link, while self-implemented sample-and-hold mode stays at 9-11%","articleBody":"### Unity version\n\n6000.0.40\n\n### Where does the issue occur?\n\n- [x] In Unity Editor\n- [ ] In Quest builds\n\n### Description\n\n## Summary\n\nWhen running in Unity Editor over Quest Link, enabling `EnvironmentDepthManager` causes sustained PC GPU 3D usage around 90-100%, even in an almost empty scene with only Passthrough + EnvironmentDepthManager.\n\nThis happens even when `OcclusionShadersMode` is set to `None`, so the issue does not appear to be caused by occlusion shader rendering.\n\nI tested a sample-and-hold workaround where the depth provider is only enabled when a new depth sample is needed, one valid depth texture is acquired, then the provider is disabled again while the last valid depth texture remains cached. With this approach, even at 90Hz sampling, sustained PC GPU 3D usage stays around 9-11%.\n\nThis suggests the abnormal GPU cost may be related to keeping the OpenXR environment depth provider continuously enabled in Quest Link Editor mode, rather than the cost of acquiring depth frames at high frequency.\n\n## Environment\n\n- Unity version: 6000.0.40\n- Meta XR Core SDK version: v85\n- Also tested: v77\n- Device: Quest 3\n- Runtime: Unity Editor over Quest Link\n- GPU: RTX 5090\n- Render pipeline: URP\n- Graphics API: Vulkan\n- Passthrough enabled: yes\n\n\n\n\n\n### Steps to reproduce\n\n## Minimal Reproduction\n\n1. Create an empty Unity scene.\n2. Enable Passthrough.\n3. Add `EnvironmentDepthManager`.\n4. Set `OcclusionShadersMode` to `None`.\n5. Run the scene in Unity Editor over Quest Link.\n6. Observe Windows Task Manager GPU 3D usage.\n\n\n## Observed Result\n\n- Passthrough only: low PC GPU 3D usage.\n- Passthrough + `EnvironmentDepthManager` continuous mode: sustained 90-100% PC GPU 3D usage.\n- Meta XR Core SDK v77: around 80% GPU 3D usage.\n- Meta XR Core SDK v85: around 90%+ GPU 3D usage.\n- The high GPU usage happens even when `OcclusionShadersMode = None`.\n\n## Sample-and-Hold Workaround Result\n\nI tested a workaround that changes the manager behavior from continuous provider enabled to sample-and-hold:\n\n1. Enable the depth provider when a new sample is due.\n2. Acquire one updated depth texture.\n3. Keep the last valid depth texture bound/cached.\n4. Disable the depth provider until the next sample interval.\n\nResults:\n\n| Mode | Sample rate | Sustained PC GPU 3D usage |\n|---|---:|---:|\n| Passthrough only | N/A | low / baseline |\n| EnvironmentDepthManager continuous | per-frame / continuous provider enabled | 90-100% |\n| Sample-and-hold | 8Hz | ~9-11% |\n| Sample-and-hold | 32Hz | ~9-11% |\n| Sample-and-hold | 64Hz | ~9-11% |\n| Sample-and-hold | 90Hz | ~9-11% |\n\nThere may be a short GPU spike when the provider is first enabled, but after that the usage drops and remains around 9-11%.\n\n## Expected Result\n\n`EnvironmentDepthManager` should not cause sustained 90-100% PC GPU 3D usage in Quest Link Editor mode, especially when occlusion shader rendering is disabled.\n\nIf continuous provider mode is expected to be expensive in Quest Link, it would be helpful to expose an official configurable sampling mode or sample-and-hold mode.\n\n## Workaround / Hypothesis\n\nThe sample-and-hold test suggests that the cost is not primarily caused by the frequency of `TryGetUpdatedDepthTexture()` calls. Even at 90Hz sample-and-hold, GPU usage remains low.\n\nThe abnormal sustained GPU usage appears to be related to keeping the OpenXR environment depth provider continuously enabled in Quest Link Editor mode.\n\n## Enhancement Request\n\nPlease consider exposing an official API or inspector option for:\n\n- sample-and-hold depth updates\n- configurable environment depth sampling rate\n- keeping the last valid depth texture cached while temporarily disabling provider acquisition\n- safer provider lifecycle behavior in Unity Editor / Quest Link mode\n\nThis would allow applications that do not need fully continuous per-frame occlusion to use Environment Depth without saturating the PC GPU in Quest Link.\n\n\n\n\n### Logs\n\n```text\nnone\n```\n\n### Additional info\n\n\n```\n//Simplified sample-and-hold workaround\n\nprivate bool providerRunning;\nprivate float nextSampleTime;\nprivate float sampleHz = 90f;\n\nprivate void OnBeforeRender()\n{\n    float now = Time.realtimeSinceStartup;\n\n    if (!providerRunning \u0026\u0026 now \u003e= nextSampleTime)\n    {\n        provider.SetDepthEnabled(true, removeHands: false);\n        providerRunning = true;\n    }\n\n    if (!providerRunning)\n    {\n        return;\n    }\n\n    if (!provider.TryGetUpdatedDepthTexture(out var depthTexture, frameDescriptors))\n    {\n        return;\n    }\n\n    if (depthTexture == null || !depthTexture.IsCreated())\n    {\n        return;\n    }\n\n    Shader.SetGlobalTexture(EnvironmentDepthTextureId, depthTexture);\n\n    provider.SetDepthEnabled(false, false);\n    providerRunning = false;\n\n    nextSampleTime = now + 1f / Mathf.Max(1f, sampleHz);\n}\n\n\n```\n\n\n","author":{"url":"https://github.com/changruizhu96","@type":"Person","name":"changruizhu96"},"datePublished":"2026-04-28T23:12:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/96/Unity-DepthAPI/issues/96"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7c495fd7-a992-e025-3c84-52b43b4b40ac
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCACC:3F6EBB:269B67:333735:6A4D8A0F
html-safe-nonce591005f1f38da55a15405a44932f6b8b3184d1f7f0067a107f30d697f7ea9643
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUNDOjNGNkVCQjoyNjlCNjc6MzMzNzM1OjZBNEQ4QTBGIiwidmlzaXRvcl9pZCI6IjUyNTI5NjExNDM1OTY5OTk4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf115a9cfe19e35a3a46a4eb0718acc8322c757665e3594046c13f8a7f00b9471
hovercard-subject-tagissue:4346833902
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/oculus-samples/Unity-DepthAPI/96/issue_layout
twitter:imagehttps://opengraph.githubassets.com/463704520a3c3fd7cf26866f46b62a0223c18ba3b9081284c6a7ca6c3e0a6d7b/oculus-samples/Unity-DepthAPI/issues/96
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/463704520a3c3fd7cf26866f46b62a0223c18ba3b9081284c6a7ca6c3e0a6d7b/oculus-samples/Unity-DepthAPI/issues/96
og:image:altUnity version 6000.0.40 Where does the issue occur? In Unity Editor In Quest builds Description Summary When running in Unity Editor over Quest Link, enabling EnvironmentDepthManager causes sustain...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamechangruizhu96
hostnamegithub.com
expected-hostnamegithub.com
None9f8758a3953dfe943439713a6fa4f90d542a3431f10e861ca03dd7f39009f320
turbo-cache-controlno-preview
go-importgithub.com/oculus-samples/Unity-DepthAPI git https://github.com/oculus-samples/Unity-DepthAPI.git
octolytics-dimension-user_id92825639
octolytics-dimension-user_loginoculus-samples
octolytics-dimension-repository_id696182619
octolytics-dimension-repository_nwooculus-samples/Unity-DepthAPI
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id696182619
octolytics-dimension-repository_network_root_nwooculus-samples/Unity-DepthAPI
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasebffd5484f01713a661b03469b77678f72b6574ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/oculus-samples/Unity-DepthAPI/issues/96#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Foculus-samples%2FUnity-DepthAPI%2Fissues%2F96
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Foculus-samples%2FUnity-DepthAPI%2Fissues%2F96
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=oculus-samples%2FUnity-DepthAPI
Reloadhttps://github.com/oculus-samples/Unity-DepthAPI/issues/96
Reloadhttps://github.com/oculus-samples/Unity-DepthAPI/issues/96
Reloadhttps://github.com/oculus-samples/Unity-DepthAPI/issues/96
Please reload this pagehttps://github.com/oculus-samples/Unity-DepthAPI/issues/96
oculus-samples https://github.com/oculus-samples
Unity-DepthAPIhttps://github.com/oculus-samples/Unity-DepthAPI
Notifications https://github.com/login?return_to=%2Foculus-samples%2FUnity-DepthAPI
Fork 46 https://github.com/login?return_to=%2Foculus-samples%2FUnity-DepthAPI
Star 285 https://github.com/login?return_to=%2Foculus-samples%2FUnity-DepthAPI
Code https://github.com/oculus-samples/Unity-DepthAPI
Issues 0 https://github.com/oculus-samples/Unity-DepthAPI/issues
Pull requests 0 https://github.com/oculus-samples/Unity-DepthAPI/pulls
Actions https://github.com/oculus-samples/Unity-DepthAPI/actions
Projects https://github.com/oculus-samples/Unity-DepthAPI/projects
Security and quality 0 https://github.com/oculus-samples/Unity-DepthAPI/security
Insights https://github.com/oculus-samples/Unity-DepthAPI/pulse
Code https://github.com/oculus-samples/Unity-DepthAPI
Issues https://github.com/oculus-samples/Unity-DepthAPI/issues
Pull requests https://github.com/oculus-samples/Unity-DepthAPI/pulls
Actions https://github.com/oculus-samples/Unity-DepthAPI/actions
Projects https://github.com/oculus-samples/Unity-DepthAPI/projects
Security and quality https://github.com/oculus-samples/Unity-DepthAPI/security
Insights https://github.com/oculus-samples/Unity-DepthAPI/pulse
[Bug/Enhancement] original EnvironmentDepthManager provider causes 90-100% PC GPU usage in Quest Link, while self-implemented sample-and-hold mode stays at 9-11%https://github.com/oculus-samples/Unity-DepthAPI/issues/96#top
https://github.com/changruizhu96
changruizhu96https://github.com/changruizhu96
on Apr 28, 2026https://github.com/oculus-samples/Unity-DepthAPI/issues/96#issue-4346833902
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.