I want to use translucent material in vision

Asked on 2024-06-19

1 search

To use translucent material in visionOS, you can refer to the session titled "Render Metal with passthrough in visionOS". This session covers how to handle rendering with transparency and blending in visionOS.

Here are some key points from the session:

  1. Alpha Blending: VisionOS uses pre-multiplied alpha color convention, which means you need to multiply the color channels in your shaders by the alpha value before passing it to composite or services. This is crucial for achieving realistic blending of translucent materials.

  2. Immersion Styles: Depending on whether you are using full immersion or mixed immersion, you will need to clear the color texture differently. For full immersion, clear the color texture to (0, 0, 1), and for mixed immersion, use all zeros.

  3. Depth and Color Textures: You need to ensure that the depth and color textures are properly set up and cleared before rendering starts. This involves setting the alpha value in the color texture to zero for mixed immersion.

For more detailed information, you can watch the session Render Metal with passthrough in visionOS starting at 04:35.

Additionally, the session "Enhance the immersion of media viewing in custom environments" discusses how to use environment probes to provide realistic lighting and reflections, which can be useful when working with translucent materials. You can check out this session here starting at 10:41.

Relevant Sessions

  1. Render Metal with passthrough in visionOS
  2. Enhance the immersion of media viewing in custom environments
I want to use translucent material in vision | Ask WWDC