I can't find the Hybrid sample

The following page seems to have a sample of “Hybrid - Switching between Metal and RealityKit App Modes”, but I could not find it in the PolySpatial package samples.
Where can I find the Hybrid sample?

https://docs.unity3d.com/Packages/com.unity.polyspatial.visionos@2.0/manual/SamplesImport.html

1 Like

Hey there! You’re not missing anything. There is no Hybrid sample. You can enable Hybrid mode in visionOS settings, and show an immersive compositor layer by swapping one of your Volume Cameras to Metal mode. You can read more about Hybrid mode here.

If you would like us to add specific samples for Hybrid mode, please submit an “idea” on the roadmap.

1 Like

Thank you for your response.
I understand that the RealityKit sample is also compatible with the Hybrid setting.
I will start by changing the RealityKit sample to Metal as a test.

I’m having trouble with a use case:

  1. Launch scene is bounded with project set to Hybrid mode
  2. Next scene is loaded and contains a metal volume configuration
  3. Shader errors occur because app is still rendering via RealityKit rather than Metal

Is it possible to render individual scenes via realitykit and metal?

1 Like

Excuse me for interrupting.
Since this thread has been resolved, you may want to start a new thread if you want to get an official response.

It might work if you use MaterialSwapSet.
It seems like it would be a good idea to replace the materials in the scene with those for Metal, and use MaterialSwapSet to bind the corresponding RealityKit materials together.

Hi there! Yes, it should be possible to configure one scene for RealityKit, and one for Metal. As @mnakagami points out, you can use MaterialSwapSet to specify fallback materials for RealityKit. But I’m surprised to hear:

Shader errors occur because app is still rendering via RealityKit rather than Metal

What shader errors, exactly? Do you have any bounded volume cameras or anything like that in your metal scene? It’s possible that maybe for a single frame we load the new scene still in RealityKit mode or something, but we’ve tested multiple situations like this without running into issues.

Are you able to submit a bug report (Help > Report a bug...) with this project attached? If we can replicate the issue on our end, we’ll be able to identify whether this is a bug in our package code, or suggest a fix on your end.