Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chroma key passthrough #86

Open
LennartJohansen opened this issue Mar 8, 2024 · 6 comments
Open

Chroma key passthrough #86

LennartJohansen opened this issue Mar 8, 2024 · 6 comments
Labels
Apple pls Apple needs to fix something, no workaround

Comments

@LennartJohansen
Copy link

Would it be hard to add a chroma key passthrough to the client application?

I tried to change the immersion mode of the application from full to mixed.
Setting alpha in the fragment shader had no effect and discarding pixels only makes the output black.

Anyone know if there is some additional settings needed to get passthrough working. Settings on the composition layers, depth or anything else?

It would be nice with an option to set a color and tolerance that we could process in the fragment shader to set a pixel transparent.

@LennartJohansen
Copy link
Author

Looks like the passthrough functionality is not available when using CompositorLayers and Metal shaders.
You have to use RealityView to get a proper mixed mode with passthrough.

I guess the color calculations done in the fragment shader could output to a new texture in memory. Then this could be used on the plane rendered with RealityView using an unlit shader. And in this mode we could discard pixels.

Could this help with the 1.5 meter area for immersive applications. With the unlit shader the output using RealityView would not be affected by room lighting. Is the 1.5 meter enforced in mixed applications like this?

@shinyquagsire23
Copy link
Collaborator

RealityView isn't ~super viable unless we can get precise vsync timing, is the thing. We have to know the exact head pose at every vsync, or we won't be able to correctly timewarp (the world will look sloshy)

@shinyquagsire23 shinyquagsire23 added the Apple pls Apple needs to fix something, no workaround label Mar 8, 2024
@gagagu
Copy link

gagagu commented Jul 29, 2024

Since some time has passed, I wanted to ask again if anything has changed? Mixed Reality with Flightsimulator would be fantastic.

@shinyquagsire23
Copy link
Collaborator

it's fully implemented client-side, however on visionOS 1.x you'll have to use the Experimental Renderer. Also, unfortunately, Apple broke backwards compat on Xcode beta 16 (needed for visionOS 2 features), so the testflights are a mess atm.

@gagagu
Copy link

gagagu commented Jul 29, 2024

Ahh, okay, thx for reply!

@kensuddaby
Copy link

Any updates on this? A chroma key passthrough of parts of a cockpit in DCS would be amazing because only AVP has good enough passthrough to read actual MFD screens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apple pls Apple needs to fix something, no workaround
Projects
None yet
Development

No branches or pull requests

4 participants