Does HDR work with Passthrough for VisionOS2 - Metal?

Hello,

I am developing a project for Vision OS 2 and using all of the latest betas to do so. At the moment I have managed to get my passthrough setup working with post processing and I am using a full screen pass feature for the URP that allows me to create masks with game objects to dictate where my passthrough occurs. Everything works great at the moment, however, when I turn on HDR my passthrough is now rendering black. Just to help outline my render process, here is the order

Everything gets rendered>Post Process gets applied>FullScreen shader will set the color value and alpha to 0 based on a stencil mask, allowing passthrough to be seen.

It would be helpful to know what knock on effects turning the HDR button in the UniversalRenderPipelineAsset>Quality. Seems weird that everything works fine without it turned on, and I am assuming tone mapping should happen before the PP, in which case my full screen shader should come after that.

I have tried many different settings, including the alpha processing option that was pointed out in another post.

Any advice would be greatly appreciated.

Hey there! Me again :upside_down_face:

I was mistaken in my last post about HDR + Passthrough working on the latest version of things. Although we did ship the fixes needed in the core engine with Unity 6000.0.18f1, the package-side fixes still haven’t shipped yet. I had forgotten which version the fix went into and just double-checked the live package and it doesn’t include that project validation rule in the screenshot I shared earlier, which was based on the current mainline. We should have a new package version available very soon that includes the package-side fixes for HDR + Passthrough. In the meantime, you’ll need to test with HDR disabled. Sorry for the confusion!

I’ll update this thread when the next version ships. Thank you again for your patience and good luck!

Thanks so much for the reply, and I will be looking forward to the release that includes this fix. HDR + Passthrough would be a huge win for this project, so it’s definitely something I’ll look forward to.

Oddly enough, my project validation doesn’t complain about HDR being turned on, it just makes my passthrough turn black when it’s turned on.

Thanks again!

Yeah… part of the HDR fix is adding those project validation rules that kind of “retroactively” apply to older editor versions. Now that we have HDR all buttoned up (or at least we think it’s buttoned up :sweat_smile:) we can warn users about what might go wrong on earlier Editor versions. We hadn’t fully worked out all of the failure cases early on which is why the earlier package versions don’t have validation rules for those unknowns. Another wrinkle in all of this is that, when we initially investigated HDR support on Vision Pro, Metal+Passthrough wasn’t an option, so the requirement to preserve alpha never came up. Then visionOS 2 comes along… :slight_smile:

Hopefully that helps explain why this issue slipped through the cracks for a few releases. After all, visionOS 2 only just left beta status! Please keep the bug reports coming so we can catch any remaining issues while we’re still in preview status. :slight_smile:

Hey there again. Just wanted to check to see if this fix made it into 6000.0.20f1? I downloaded it, built my project, installed it onto the Vision pro and alas, my passthrough is still black when HDR is enabled. I doubt there will be another minor release soon enough for me to complete this project with HDR feature enabled, so if you know of a manual fix I can implement, that would also be greatly appreciated.

Also, if I could better understand the issue, maybe I could help patch the problem on my end. So I am guessing that at some point during the render pipeline, when HDR is getting applied, or tonemapping it is writing an alpha of 1 for all of the pixels, correct? The weird thing is, I am pretty sure all tonemapping happens in the post processing pass, and my full screen effect is writing 0 to the alpha channel, and my full screen render pass feature is set to “After Post Processing”. I feel like this would have achieved the desired effect, but apparently not.

Unfortunately, this fix also requires a package release that is still in the pipe. And the changes in the package are applied to the closed-source XR plug-in, so it’s not something you can fix on your end.

The issue comes down to the texture formats being used at various stages of the pipeline. You’re getting black pixels because the format of the intermediate render texture is one that doesn’t include an alpha channel.

Sounds like you’re under a tight deadline. I’ll reach out on DM and see if I can maybe share a patch or come up with a way to fix this for you in the short term. If you’re able to share your project with me or maybe do a screen share to identify specifically how you have things set up, we might be able to get you sorted before the package ships.

For anyone following along. I believe the real issue was having FXAA enabled on the camera. When this gets enabled, it makes the passthrough turn to black in the Vision Pro. Happy it’s resolved though!

1 Like