cancel
Showing results for 
Search instead for 
Did you mean: 

16 Bit Depth Buffer

DonCon
Explorer
Hi there !
The documentation states that it would be beneficial to use a 16bit depth buffer and no stencil, but doesnt tell us how to achieve this.
Does anybody know how ?

I am using Unity 2019.4 with URP 7.4 & Oculus Quest 1
I tried brute forcing the depth buffer to 16 bit by editing in UniversalRenderPipelineCore.cs function:
 static RenderTextureDescriptor CreateRenderTextureDescriptor(Camera camera, float renderScale,
            bool isStereoEnabled, bool isHdrEnabled, int msaaSamples, bool needsAlpha)

Just add this line before return : desc.depthBufferBits = 16; // Override to 16 bit depth

And it clearly works in Editor as i get a lot more z-fighting with big camera clipping planes, but when i use ovrgpuprofiler or renderdoc it still shows me DepthBuffer with 24bit and 8bit Stencil.

I really hope someone from Oculus chimes can help with this!

Best regards,
Tim



4 REPLIES 4

DonCornholio
Honored Guest
Bumping this thread !

Sandstedt
Expert Protege

I guess it's here:
Project Settings > XR Plug-in Management > OpenXR > Tab: Android > Depth Submission Mode: Depth 16-bit

SanCity_0-1637267146607.png

 

This has (incredibly) been removed, so we all now are facing the stupid Z buffer problem again.

Thousands of developers.

Hey there, @PolyMad! You may want to try reaching out to the developer support center. Once you get there, they'll have more tools available to assist you with this issue. I'd be happy to share the steps on how to reach out to them below:

  1. Go to the Developer Support Center and click on the "Sign In" link in the upper right corner.
  2. Sign into your developer account.
  3. Then use the "Contact Usform to create a support request.
  4. Once created, you can monitor your support request using this link.

I hope this information helps!