# Composition Layer Components

The Interaction prefab contains a Gaze Pointer prefab which makes use of Composition Layers to render content.

# Gaze Pointer

The Gaze Pointer is comprised of the following GameObjects:

Gaze Pointer Hierarchy

The XR Gaze Interactor GameObject has a Spaces Composition Layer component. This creates a Quad Layer which shows view locked content. In combination with the UI Overlay Camera GameObject this renders the gaze pointer UI element in a way that improves the stability and clarity of the pointer, at the cost of some performance.


The Spaces Composition Layer component is only supported when using OpenGLES3 as the Graphics API, and not Vulkan. The currently chosen Graphics APIs can be seen at Project Settings > Player > Other Settings > Rendering > Graphics APIs.

Composition Layer Component
  • Layer Texture: A texture which will be rendered to the view locked quad layer.
  • Extents: The size of the quad layer to render in meters.
  • Orientation: The orientation of the quad layer, relative to the view of the main camera. Quad layers only have front faces and will not be visible if they are facing away from the main camera.
  • Position: The position of the quad layer, relative to the view of the main camera.
  • Sorting Order: The order in which the quad layer will be rendered. A lower number represents a lower layer. See Sorting Order.

# Sample Configuration

In the Snapdragon Spaces SDK samples, the view locked gaze pointer is configured as follows:

  • The Spaces Composition Layer consists of a 10cm x 10cm quad layer, composited into a position 2m in front of the main camera.
  • It draws the contents of the UI Overlay Render Texture into this quad.
  • The contents of this image are captured by the UI Overlay Camera in its Target Texture field.
  • The camera uses a Culling Mask to only capture contents in the UI Overlay layer.
  • The only elements on the UI Overlay layer are the Reticle Canvas GameObject and its children.
  • The Reticle Canvas has its Render Camera property set to UI Overlay Camera.

Spaces Composition Layer components can be configured with static or dynamic textures as needed. Enabling or disabling the component will hide/show the content they render.