reckfellENGINE

OpenXRCompositionLayer

Shared base for OpenXR composition-layer surfaces.

On this page
class OpenXRCompositionLayerReckfellSharpInherits Entity3D

Base Entity3D for presenting a separate surface through the OpenXR compositor. Use a concrete Quad/Cylinder/Equirect shape. LayerViewport, AlphaBlend and native SortOrder are not ordinary GUI z-index. Assign a distinct viewport with positive Size and explicit Always update; the reference transfers no ownership.

Entity existence and IsNativelySupported establish no ready swapchain/frame. Editor/no-API and unsupported-runtime paths may use mesh fallback with different quality, depth behavior and spectator visibility. SortOrder does not order fallback meshes.

A camera ancestor selects head-locked space; otherwise world-locked. Avoid scale/shear in the hierarchy and change shape dimensions instead. LocalFloor does not place a menu in front of a moved player. Hole punching requires negative SortOrder and device-level composition verification.

Setup and QuadUiRay. Twenty headless checks cover ray-to-pixel helper and metadata, not native submission, GUI events, hole-punch pixels, headset or export. This review covers selected core base members, not its entire API.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties19

AlphaBlendProperty
# AlphaBlend
C#
public bool AlphaBlend { get; set; }

Enables composition using layer alpha; initially false. Transparent UI also needs viewport TransparentBg and an actually transparent UI background. The setter updates the native flag and fallback material without establishing visible headset output.

AndroidSurfaceSizeProperty
# AndroidSurfaceSize
C#
public Vector2I AndroidSurfaceSize { get; set; }

Requested Android surface pixel size, initially 1024×1024. Set positive components before obtaining the surface. Does not change LayerViewport.Size. Resizing an existing surface requires the Android swapchain-update extension; the getter reports the request, not an acknowledged producer size.

EnableHolePunchProperty
# EnableHolePunch
C#
public bool EnableHolePunch { get; set; }

Enables hole-punch mesh/material behavior, initially false. Native composition requires negative SortOrder, for example -1; a nonnegative order produces a configuration warning. The flag alone establishes no correct occlusion. Fallback material depth-test behavior changes; pixels were not tested.

EyeVisibilityProperty
# EyeVisibility
C#
public OpenXRCompositionLayer.EyeVisibilityEnum EyeVisibility { get; set; }

Eyes receiving the native layer: Both by default, Left or Right. Neither an Entity visibility mask nor a viewport selector. Updates native Quad/Cylinder/Equirect state; equivalent ordinary mesh-fallback behavior is not established.

LayerViewportProperty
# LayerViewport
C#
public SubViewport LayerViewport { get; set; }

Assigned SubViewport or null. A viewport cannot be used by multiple in-tree layers. Assignment changes WhenVisible/WhenParentVisible to Always with a warning; Disabled is not automatically repaired. A nonnull viewport is rejected while Android surface mode is enabled. The borrowed reference transfers no ownership; detach it before deleting a separately owned viewport.

ProtectedContentProperty
# ProtectedContent
C#
public bool ProtectedContent { get; set; }

Protected-content request, initially false. Passed as an XR swapchain creation flag; set before creating the surface/swapchain. The getter reads the request, not protection status. It establishes no DRM or capture-prevention guarantee: verify support, creation errors and security on the target device.

SortOrderProperty
# SortOrder
C#
public int SortOrder { get; set; }

Native composition order, initially 1: higher values appear in front. The main projection occupies 0; avoid equality with 0, which may conflict with it. Negative order places the layer behind the projection and is required for hole punching. Does not order an ordinary fallback mesh; neither GUI z-index nor physical distance.

SwapchainStateAlphaSwizzleProperty
# SwapchainStateAlphaSwizzle
C#
public OpenXRCompositionLayer.Swizzle SwapchainStateAlphaSwizzle { get; set; }

Source of the output alpha channel when sampling the layer, initially Alpha. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateBlueSwizzleProperty
# SwapchainStateBlueSwizzle
C#
public OpenXRCompositionLayer.Swizzle SwapchainStateBlueSwizzle { get; set; }

Source of the output blue channel when sampling the layer, initially Blue. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateBorderColorProperty
# SwapchainStateBorderColor
C#
public Color SwapchainStateBorderColor { get; set; }

Out-of-texture sample color for ClampToBorder, initially transparent black Color(0,0,0,0). Does not recolor the viewport or UI background. Alpha visibility also depends on AlphaBlend and transparent content; setting this color alone does not establish transparent composition. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateGreenSwizzleProperty
# SwapchainStateGreenSwizzle
C#
public OpenXRCompositionLayer.Swizzle SwapchainStateGreenSwizzle { get; set; }

Source of the output green channel when sampling the layer, initially Green. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateHorizontalWrapProperty
# SwapchainStateHorizontalWrap
C#
public OpenXRCompositionLayer.Wrap SwapchainStateHorizontalWrap { get; set; }

Horizontal texture addressing, initially ClampToBorder. Repeat tiles, MirroredRepeat alternates direction, ClampToEdge extends the edge, and ClampToBorder uses BorderColor. OpenGL ES maps MirrorClampToEdge to ClampToEdge without mirroring. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateMagFilterProperty
# SwapchainStateMagFilter
C#
public OpenXRCompositionLayer.Filter SwapchainStateMagFilter { get; set; }

Layer image magnification filter, initially Linear. Nearest uses hard pixel sampling; Linear interpolates. Cubic requires the corresponding graphics-extension support. Does not increase LayerViewport resolution. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateMaxAnisotropyProperty
# SwapchainStateMaxAnisotropy
C#
public float SwapchainStateMaxAnisotropy { get; set; }

Requested maximum anisotropy, initially 1. Can improve oblique-surface sampling when supported by the compositor. Use a finite value >=1 within device limits. The setter even stores zero without validation; its getter establishes neither GPU validity nor application. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateMinFilterProperty
# SwapchainStateMinFilter
C#
public OpenXRCompositionLayer.Filter SwapchainStateMinFilter { get; set; }

Layer image minification filter, initially Linear. Nearest keeps hard pixel sampling; Linear interpolates samples. Cubic is forwarded as a graphics-extension mode and needs device support. A stored enum does not confirm compositor application. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateMipmapModeProperty
# SwapchainStateMipmapMode
C#
public OpenXRCompositionLayer.MipmapMode SwapchainStateMipmapMode { get; set; }

Mip-level selection for minification, initially Linear; Nearest and Disabled are also available. Does not generate mipmaps. Current Vulkan mapping forwards Disabled as Linear too: do not assume it disables mip selection on every backend. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateRedSwizzleProperty
# SwapchainStateRedSwizzle
C#
public OpenXRCompositionLayer.Swizzle SwapchainStateRedSwizzle { get; set; }

Source of the output red channel when sampling the layer, initially Red. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

SwapchainStateVerticalWrapProperty
# SwapchainStateVerticalWrap
C#
public OpenXRCompositionLayer.Wrap SwapchainStateVerticalWrap { get; set; }

Vertical texture addressing, initially ClampToBorder. Controls sampling outside the texture, not surface or viewport height. OpenGL ES maps MirrorClampToEdge to ClampToEdge; equal stored enums need not produce equal backend imagery. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

UseAndroidSurfaceProperty
# UseAndroidSurface
C#
public bool UseAndroidSurface { get; set; }

Selects Android surface input instead of SubViewport, initially false. Enabling clears LayerViewport; disabling does not restore it, so assign it again. Requires Android and XR_FB_android_surface_swapchain_create. Successful flag assignment on Windows creates no surface and establishes no support.

Methods41

GetAlphaBlendbool
# GetAlphaBlend
C#
public bool GetAlphaBlend();

Returns the stored value. Enables composition using layer alpha; initially false. Transparent UI also needs viewport TransparentBg and an actually transparent UI background. The setter updates the native flag and fallback material without establishing visible headset output.

Returns bool

Enables composition using layer alpha; initially false. Transparent UI also needs viewport TransparentBg and an actually transparent UI background. The setter updates the native flag and fallback material without establishing visible headset output.

GetAlphaSwizzleOpenXRCompositionLayer.Swizzle
# GetAlphaSwizzle
C#
public OpenXRCompositionLayer.Swizzle GetAlphaSwizzle();

Reads the stored request. Source of the output alpha channel when sampling the layer, initially Alpha. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.Swizzle

Stored setting value; does not acknowledge compositor application.

GetAndroidSurfaceJavaObject
# GetAndroidSurface
C#
public JavaObject GetAndroidSurface();

Returns the layer-held JavaObject for android.view.Surface, or null. On Android the getter may lazily create the surface; it is not a passive readiness query. Requires UseAndroidSurface and the corresponding OpenXR extension. Do not dispose the borrowed wrapper; stop the external producer before deleting the layer. Windows XR-off execution established only null.

Returns JavaObject

Returns the layer-held JavaObject for android.view.Surface, or null. On Android the getter may lazily create the surface; it is not a passive readiness query. Requires UseAndroidSurface and the corresponding OpenXR extension. Do not dispose the borrowed wrapper; stop the external producer before deleting the layer. Windows XR-off execution established only null.

GetAndroidSurfaceSizeVector2I
# GetAndroidSurfaceSize
C#
public Vector2I GetAndroidSurfaceSize();

Reads the stored request. Requested Android surface pixel size, initially 1024×1024. Set positive components before obtaining the surface. Does not change LayerViewport.Size. Resizing an existing surface requires the Android swapchain-update extension; the getter reports the request, not an acknowledged producer size.

Returns Vector2I

Stored setting value; does not acknowledge compositor application.

GetBlueSwizzleOpenXRCompositionLayer.Swizzle
# GetBlueSwizzle
C#
public OpenXRCompositionLayer.Swizzle GetBlueSwizzle();

Reads the stored request. Source of the output blue channel when sampling the layer, initially Blue. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.Swizzle

Stored setting value; does not acknowledge compositor application.

GetBorderColorColor
# GetBorderColor
C#
public Color GetBorderColor();

Reads the stored request. Out-of-texture sample color for ClampToBorder, initially transparent black Color(0,0,0,0). Does not recolor the viewport or UI background. Alpha visibility also depends on AlphaBlend and transparent content; setting this color alone does not establish transparent composition. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns Color

Stored setting value; does not acknowledge compositor application.

GetEnableHolePunchbool
# GetEnableHolePunch
C#
public bool GetEnableHolePunch();

Returns the stored value. Enables hole-punch mesh/material behavior, initially false. Native composition requires negative SortOrder, for example -1; a nonnegative order produces a configuration warning. The flag alone establishes no correct occlusion. Fallback material depth-test behavior changes; pixels were not tested.

Returns bool

Enables hole-punch mesh/material behavior, initially false. Native composition requires negative SortOrder, for example -1; a nonnegative order produces a configuration warning. The flag alone establishes no correct occlusion. Fallback material depth-test behavior changes; pixels were not tested.

GetEyeVisibilityOpenXRCompositionLayer.EyeVisibilityEnum
# GetEyeVisibility
C#
public OpenXRCompositionLayer.EyeVisibilityEnum GetEyeVisibility();

Reads the stored request. Eyes receiving the native layer: Both by default, Left or Right. Neither an Entity visibility mask nor a viewport selector. Updates native Quad/Cylinder/Equirect state; equivalent ordinary mesh-fallback behavior is not established.

Returns OpenXRCompositionLayer.EyeVisibilityEnum

Stored setting value; does not acknowledge compositor application.

GetGreenSwizzleOpenXRCompositionLayer.Swizzle
# GetGreenSwizzle
C#
public OpenXRCompositionLayer.Swizzle GetGreenSwizzle();

Reads the stored request. Source of the output green channel when sampling the layer, initially Green. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.Swizzle

Stored setting value; does not acknowledge compositor application.

GetHorizontalWrapOpenXRCompositionLayer.Wrap
# GetHorizontalWrap
C#
public OpenXRCompositionLayer.Wrap GetHorizontalWrap();

Reads the stored request. Horizontal texture addressing, initially ClampToBorder. Repeat tiles, MirroredRepeat alternates direction, ClampToEdge extends the edge, and ClampToBorder uses BorderColor. OpenGL ES maps MirrorClampToEdge to ClampToEdge without mirroring. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.Wrap

Stored setting value; does not acknowledge compositor application.

GetLayerViewportSubViewport
# GetLayerViewport
C#
public SubViewport GetLayerViewport();

Returns the stored value. Assigned SubViewport or null. A viewport cannot be used by multiple in-tree layers. Assignment changes WhenVisible/WhenParentVisible to Always with a warning; Disabled is not automatically repaired. A nonnull viewport is rejected while Android surface mode is enabled. The borrowed reference transfers no ownership; detach it before deleting a separately owned viewport.

Returns SubViewport

Borrowed assigned viewport or null; ownership is not transferred.

GetMagFilterOpenXRCompositionLayer.Filter
# GetMagFilter
C#
public OpenXRCompositionLayer.Filter GetMagFilter();

Reads the stored request. Layer image magnification filter, initially Linear. Nearest uses hard pixel sampling; Linear interpolates. Cubic requires the corresponding graphics-extension support. Does not increase LayerViewport resolution. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.Filter

Stored setting value; does not acknowledge compositor application.

GetMaxAnisotropyfloat
# GetMaxAnisotropy
C#
public float GetMaxAnisotropy();

Reads the stored request. Requested maximum anisotropy, initially 1. Can improve oblique-surface sampling when supported by the compositor. Use a finite value >=1 within device limits. The setter even stores zero without validation; its getter establishes neither GPU validity nor application. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns float

Stored setting value; does not acknowledge compositor application.

GetMinFilterOpenXRCompositionLayer.Filter
# GetMinFilter
C#
public OpenXRCompositionLayer.Filter GetMinFilter();

Reads the stored request. Layer image minification filter, initially Linear. Nearest keeps hard pixel sampling; Linear interpolates samples. Cubic is forwarded as a graphics-extension mode and needs device support. A stored enum does not confirm compositor application. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.Filter

Stored setting value; does not acknowledge compositor application.

GetMipmapModeOpenXRCompositionLayer.MipmapMode
# GetMipmapMode
C#
public OpenXRCompositionLayer.MipmapMode GetMipmapMode();

Reads the stored request. Mip-level selection for minification, initially Linear; Nearest and Disabled are also available. Does not generate mipmaps. Current Vulkan mapping forwards Disabled as Linear too: do not assume it disables mip selection on every backend. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.MipmapMode

Stored setting value; does not acknowledge compositor application.

GetRedSwizzleOpenXRCompositionLayer.Swizzle
# GetRedSwizzle
C#
public OpenXRCompositionLayer.Swizzle GetRedSwizzle();

Reads the stored request. Source of the output red channel when sampling the layer, initially Red. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.Swizzle

Stored setting value; does not acknowledge compositor application.

GetSortOrderint
# GetSortOrder
C#
public int GetSortOrder();

Returns the stored value. Native composition order, initially 1: higher values appear in front. The main projection occupies 0; avoid equality with 0, which may conflict with it. Negative order places the layer behind the projection and is required for hole punching. Does not order an ordinary fallback mesh; neither GUI z-index nor physical distance.

Returns int

Native composition order, initially 1: higher values appear in front. The main projection occupies 0; avoid equality with 0, which may conflict with it. Negative order places the layer behind the projection and is required for hole punching. Does not order an ordinary fallback mesh; neither GUI z-index nor physical distance.

GetUseAndroidSurfacebool
# GetUseAndroidSurface
C#
public bool GetUseAndroidSurface();

Reads the stored request. Selects Android surface input instead of SubViewport, initially false. Enabling clears LayerViewport; disabling does not restore it, so assign it again. Requires Android and XR_FB_android_surface_swapchain_create. Successful flag assignment on Windows creates no surface and establishes no support.

Returns bool

Stored setting value; does not acknowledge compositor application.

GetVerticalWrapOpenXRCompositionLayer.Wrap
# GetVerticalWrap
C#
public OpenXRCompositionLayer.Wrap GetVerticalWrap();

Reads the stored request. Vertical texture addressing, initially ClampToBorder. Controls sampling outside the texture, not surface or viewport height. OpenGL ES maps MirrorClampToEdge to ClampToEdge; equal stored enums need not produce equal backend imagery. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Returns OpenXRCompositionLayer.Wrap

Stored setting value; does not acknowledge compositor application.

IntersectsRayVector2
# IntersectsRay
C#
public Vector2 IntersectsRay(Vector3 origin, Vector3 direction);

Returns world-space ray intersection UV for the concrete layer shape; miss is Vector2(-1,-1). The base implementation always misses; shapes override it. Quad was tested with orthonormal transforms without scale/shear; UV Y points downward. Neither a physics/occlusion or visibility check nor GUI input dispatch. Validate the hit and convert UV to viewport pixels.

Parameters
NameTypeDefault
originVector3—
directionVector3—
origin

Ray origin in global coordinates, not controller-local position. Supply finite values and check current tracking.

direction

Global-space ray direction, not a target point. Use a finite nonzero normalized vector, normally the controller’s -GlobalTransform.Basis.Z.

Returns Vector2

Intersection UV or (-1,-1); does not establish absence of occluding geometry.

IsNativelySupportedbool
# IsNativelySupported
C#
public bool IsNativelySupported();

Queries the concrete layer type through the current OpenXR API/extension. False without them; Quad needs no separate shape extension, whereas Cylinder/Equirect require their extensions. Use after session startup to select a path. True guarantees no working swapchain, assigned viewport, submitted layer or visible pixels; false does not prevent fallback.

Returns bool

Type support in the current API/extension, not display readiness.

IsProtectedContentbool
# IsProtectedContent
C#
public bool IsProtectedContent();

Reads the stored request. Protected-content request, initially false. Passed as an XR swapchain creation flag; set before creating the surface/swapchain. The getter reads the request, not protection status. It establishes no DRM or capture-prevention guarantee: verify support, creation errors and security on the target device.

Returns bool

Stored setting value; does not acknowledge compositor application.

SetAlphaBlendvoid
# SetAlphaBlend
C#
public void SetAlphaBlend(bool enabled);

Stores configuration. Enables composition using layer alpha; initially false. Transparent UI also needs viewport TransparentBg and an actually transparent UI background. The setter updates the native flag and fallback material without establishing visible headset output.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable layer-alpha composition; configure viewport/UI transparency too.

SetAlphaSwizzlevoid
# SetAlphaSwizzle
C#
public void SetAlphaSwizzle(OpenXRCompositionLayer.Swizzle mode);

Source of the output alpha channel when sampling the layer, initially Alpha. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.Swizzle—
mode

Source of the output alpha channel when sampling the layer, initially Alpha. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions.

SetAndroidSurfaceSizevoid
# SetAndroidSurfaceSize
C#
public void SetAndroidSurfaceSize(Vector2I size);

Requested Android surface pixel size, initially 1024×1024. Set positive components before obtaining the surface. Does not change LayerViewport.Size. Resizing an existing surface requires the Android swapchain-update extension; the getter reports the request, not an acknowledged producer size.

Parameters
NameTypeDefault
sizeVector2I—
size

Positive surface pixel dimensions, not viewport dimensions.

SetBlueSwizzlevoid
# SetBlueSwizzle
C#
public void SetBlueSwizzle(OpenXRCompositionLayer.Swizzle mode);

Source of the output blue channel when sampling the layer, initially Blue. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.Swizzle—
mode

Source of the output blue channel when sampling the layer, initially Blue. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions.

SetBorderColorvoid
# SetBorderColor
C#
public void SetBorderColor(Color color);

Out-of-texture sample color for ClampToBorder, initially transparent black Color(0,0,0,0). Does not recolor the viewport or UI background. Alpha visibility also depends on AlphaBlend and transparent content; setting this color alone does not establish transparent composition. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
colorColor—
color

Out-of-texture sample color for ClampToBorder, initially transparent black Color(0,0,0,0). Does not recolor the viewport or UI background. Alpha visibility also depends on AlphaBlend and transparent content; setting this color alone does not establish transparent composition.

SetEnableHolePunchvoid
# SetEnableHolePunch
C#
public void SetEnableHolePunch(bool enable);

Stores configuration. Enables hole-punch mesh/material behavior, initially false. Native composition requires negative SortOrder, for example -1; a nonnegative order produces a configuration warning. The flag alone establishes no correct occlusion. Fallback material depth-test behavior changes; pixels were not tested.

Parameters
NameTypeDefault
enablebool—
enable

Enable hole punching; native composition also needs SortOrder<0. Establishes no correct pixels.

SetEyeVisibilityvoid
# SetEyeVisibility
C#
public void SetEyeVisibility(OpenXRCompositionLayer.EyeVisibilityEnum eyeVisibility);

Eyes receiving the native layer: Both by default, Left or Right. Neither an Entity visibility mask nor a viewport selector. Updates native Quad/Cylinder/Equirect state; equivalent ordinary mesh-fallback behavior is not established.

Parameters
NameTypeDefault
eyeVisibilityOpenXRCompositionLayer.EyeVisibilityEnum—
eyeVisibility

Eyes receiving the native layer: Both by default, Left or Right. Neither an Entity visibility mask nor a viewport selector. Updates native Quad/Cylinder/Equirect state; equivalent ordinary mesh-fallback behavior is not established.

SetGreenSwizzlevoid
# SetGreenSwizzle
C#
public void SetGreenSwizzle(OpenXRCompositionLayer.Swizzle mode);

Source of the output green channel when sampling the layer, initially Green. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.Swizzle—
mode

Source of the output green channel when sampling the layer, initially Green. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions.

SetHorizontalWrapvoid
# SetHorizontalWrap
C#
public void SetHorizontalWrap(OpenXRCompositionLayer.Wrap mode);

Horizontal texture addressing, initially ClampToBorder. Repeat tiles, MirroredRepeat alternates direction, ClampToEdge extends the edge, and ClampToBorder uses BorderColor. OpenGL ES maps MirrorClampToEdge to ClampToEdge without mirroring. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.Wrap—
mode

Horizontal texture addressing, initially ClampToBorder. Repeat tiles, MirroredRepeat alternates direction, ClampToEdge extends the edge, and ClampToBorder uses BorderColor. OpenGL ES maps MirrorClampToEdge to ClampToEdge without mirroring.

SetLayerViewportvoid
# SetLayerViewport
C#
public void SetLayerViewport(SubViewport viewport);

Stores configuration. Assigned SubViewport or null. A viewport cannot be used by multiple in-tree layers. Assignment changes WhenVisible/WhenParentVisible to Always with a warning; Disabled is not automatically repaired. A nonnull viewport is rejected while Android surface mode is enabled. The borrowed reference transfers no ownership; detach it before deleting a separately owned viewport.

Parameters
NameTypeDefault
viewportSubViewport—
viewport

Borrowed SubViewport, or null to detach. Needs positive pixel Size and a deliberate update mode; do not share one viewport across in-tree layers.

SetMagFiltervoid
# SetMagFilter
C#
public void SetMagFilter(OpenXRCompositionLayer.Filter mode);

Layer image magnification filter, initially Linear. Nearest uses hard pixel sampling; Linear interpolates. Cubic requires the corresponding graphics-extension support. Does not increase LayerViewport resolution. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.Filter—
mode

Layer image magnification filter, initially Linear. Nearest uses hard pixel sampling; Linear interpolates. Cubic requires the corresponding graphics-extension support. Does not increase LayerViewport resolution.

SetMaxAnisotropyvoid
# SetMaxAnisotropy
C#
public void SetMaxAnisotropy(float value);

Requested maximum anisotropy, initially 1. Can improve oblique-surface sampling when supported by the compositor. Use a finite value >=1 within device limits. The setter even stores zero without validation; its getter establishes neither GPU validity nor application. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
valuefloat—
value

Finite value >=1 within target-device limits; not automatically validated.

SetMinFiltervoid
# SetMinFilter
C#
public void SetMinFilter(OpenXRCompositionLayer.Filter mode);

Layer image minification filter, initially Linear. Nearest keeps hard pixel sampling; Linear interpolates samples. Cubic is forwarded as a graphics-extension mode and needs device support. A stored enum does not confirm compositor application. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.Filter—
mode

Layer image minification filter, initially Linear. Nearest keeps hard pixel sampling; Linear interpolates samples. Cubic is forwarded as a graphics-extension mode and needs device support. A stored enum does not confirm compositor application.

SetMipmapModevoid
# SetMipmapMode
C#
public void SetMipmapMode(OpenXRCompositionLayer.MipmapMode mode);

Mip-level selection for minification, initially Linear; Nearest and Disabled are also available. Does not generate mipmaps. Current Vulkan mapping forwards Disabled as Linear too: do not assume it disables mip selection on every backend. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.MipmapMode—
mode

Mip-level selection for minification, initially Linear; Nearest and Disabled are also available. Does not generate mipmaps. Current Vulkan mapping forwards Disabled as Linear too: do not assume it disables mip selection on every backend.

SetProtectedContentvoid
# SetProtectedContent
C#
public void SetProtectedContent(bool protectedContent);

Protected-content request, initially false. Passed as an XR swapchain creation flag; set before creating the surface/swapchain. The getter reads the request, not protection status. It establishes no DRM or capture-prevention guarantee: verify support, creation errors and security on the target device.

Parameters
NameTypeDefault
protectedContentbool—
protectedContent

Protection request for swapchain creation, not protection confirmation.

SetRedSwizzlevoid
# SetRedSwizzle
C#
public void SetRedSwizzle(OpenXRCompositionLayer.Swizzle mode);

Source of the output red channel when sampling the layer, initially Red. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.Swizzle—
mode

Source of the output red channel when sampling the layer, initially Red. Choose Red, Green, Blue, Alpha, Zero or One; Zero/One supply constants. Changes sampler mapping, not source resource pixels; actual application depends on OpenXR sampler extensions.

SetSortOrdervoid
# SetSortOrder
C#
public void SetSortOrder(int order);

Stores configuration. Native composition order, initially 1: higher values appear in front. The main projection occupies 0; avoid equality with 0, which may conflict with it. Negative order places the layer behind the projection and is required for hole punching. Does not order an ordinary fallback mesh; neither GUI z-index nor physical distance.

Parameters
NameTypeDefault
orderint—
order

Native layer order: negative behind projection, positive in front. Avoid 0; does not order the fallback mesh.

SetUseAndroidSurfacevoid
# SetUseAndroidSurface
C#
public void SetUseAndroidSurface(bool enable);

Selects Android surface input instead of SubViewport, initially false. Enabling clears LayerViewport; disabling does not restore it, so assign it again. Requires Android and XR_FB_android_surface_swapchain_create. Successful flag assignment on Windows creates no surface and establishes no support.

Parameters
NameTypeDefault
enablebool—
enable

True clears LayerViewport; false does not restore it.

SetVerticalWrapvoid
# SetVerticalWrap
C#
public void SetVerticalWrap(OpenXRCompositionLayer.Wrap mode);

Vertical texture addressing, initially ClampToBorder. Controls sampling outside the texture, not surface or viewport height. OpenGL ES maps MirrorClampToEdge to ClampToEdge; equal stored enums need not produce equal backend imagery. Native application requires XR_FB_swapchain_update_state and the active Vulkan/OpenGL ES backend extension; without them it is not applied.

Parameters
NameTypeDefault
modeOpenXRCompositionLayer.Wrap—
mode

Vertical texture addressing, initially ClampToBorder. Controls sampling outside the texture, not surface or viewport height. OpenGL ES maps MirrorClampToEdge to ClampToEdge; equal stored enums need not produce equal backend imagery.

OpenXRCompositionLayer.EyeVisibilityEnum

ValueDescription
Both = 0

The layer is visible to both the left and right eyes.

Left = 1

The layer is visible only to the left eye.

Right = 2

The layer is visible only to the right eye.

OpenXRCompositionLayer.Filter

ValueDescription
Cubic = 2

Perform cubic filtering when sampling the texture.

Linear = 1

Perform linear filtering when sampling the texture.

Nearest = 0

Perform nearest-neighbor filtering when sampling the texture.

OpenXRCompositionLayer.MipmapMode

ValueDescription
Disabled = 0

Disable mipmapping. Note: Mipmapping can only be disabled in the Compatibility renderer.

Linear = 2

Use linear interpolation of the two mipmaps of the nearest resolution.

Nearest = 1

Use the mipmap of the nearest resolution.

OpenXRCompositionLayer.Swizzle

ValueDescription
Alpha = 3

Maps a color channel to the value of the alpha channel.

Blue = 2

Maps a color channel to the value of the blue channel.

Green = 1

Maps a color channel to the value of the green channel.

One = 5

Maps a color channel to the value of one.

Red = 0

Maps a color channel to the value of the red channel.

Zero = 4

Maps a color channel to the value of zero.

OpenXRCompositionLayer.Wrap

ValueDescription
ClampToBorder = 0

Clamp the texture to its specified border color.

ClampToEdge = 1

Clamp the texture to its edge color.

MirrorClampToEdge = 4

Mirror the texture once and then clamp the texture to its edge color. Note: This wrap mode is not available in the Compatibility renderer.

MirroredRepeat = 3

Repeat the texture infinitely, mirroring it on each repeat.

Repeat = 2

Repeat the texture infinitely.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.