Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

How to add visual thickness to a glass background view

Hi guys,

In visionOS, when using a ZStack decorated with .glassBackgroundEffect(), you can see the 3D glass background from the front, but when viewed from the side, the view appears to have no thickness.

However, I noticed that in an app built by Apple, when viewing a glass background view from the side, it appears to have thickness.

I tried adding .frame(depth:) to a glass background view, but it appears as two separate layers spaced by the depth value.

My question is: Is there a view modifier that adds visual thickness to a glass background view, as shown in the picture? Or, if not, how should I write a custom view modifier to achieve this effect? Thanks!

How to add visual thickness to a glass background view
 
 
Q