OpenXRCompositionLayer
Experimental: This class may be changed or removed in future versions.
Hereda: Node3D < Node < Object
Heredado por: OpenXRCompositionLayerCylinder, OpenXRCompositionLayerEquirect, OpenXRCompositionLayerQuad
The parent class of all OpenXR composition layer nodes.
Descripción
Composition layers allow 2D viewports to be displayed inside of the headset by the XR compositor through special projections that retain their quality. This allows for rendering clear text while keeping the layer at a native resolution.
Note: If the OpenXR runtime doesn't support the given composition layer type, a fallback mesh can be generated with a ViewportTexture, in order to emulate the composition layer.
Propiedades
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Métodos
intersects_ray(origin: Vector3, direction: Vector3) const |
|
is_natively_supported() const |
Enumeraciones
enum Filter: 🔗
Filter FILTER_NEAREST = 0
Realiza un filtrado de vecino más cercano al muestrear la textura.
Filter FILTER_LINEAR = 1
Realiza un filtrado lineal al muestrear la textura.
Filter FILTER_CUBIC = 2
Realiza un filtrado cúbico al muestrear la textura.
enum MipmapMode: 🔗
MipmapMode MIPMAP_MODE_DISABLED = 0
Desactiva el mipmapping.
Nota: El mipmapping solo se puede desactivar en el renderizador de Compatibilidad.
MipmapMode MIPMAP_MODE_NEAREST = 1
Usa el mipmap de la resolución más cercana.
MipmapMode MIPMAP_MODE_LINEAR = 2
Usa la interpolación lineal de los dos mipmaps de la resolución más cercana.
enum Wrap: 🔗
Wrap WRAP_CLAMP_TO_BORDER = 0
Fija la textura al color de borde especificado.
Wrap WRAP_CLAMP_TO_EDGE = 1
Fijar la textura a su color de borde.
Wrap WRAP_REPEAT = 2
Repite la textura infinitamente.
Wrap WRAP_MIRRORED_REPEAT = 3
Repite la textura infinitamente, reflejándola en cada repetición.
Wrap WRAP_MIRROR_CLAMP_TO_EDGE = 4
Refleja la textura una vez y luego fija la textura al color de su borde.
Nota: Este modo de ajuste no está disponible en el renderizador de Compatibilidad.
enum Swizzle: 🔗
Swizzle SWIZZLE_RED = 0
Mapea un canal de color al valor del canal rojo.
Swizzle SWIZZLE_GREEN = 1
Mapea un canal de color al valor del canal verde.
Swizzle SWIZZLE_BLUE = 2
Mapea un canal de color al valor del canal azul.
Swizzle SWIZZLE_ALPHA = 3
Mapea un canal de color al valor del canal alfa.
Swizzle SWIZZLE_ZERO = 4
Mapea un canal de color al valor de cero.
Swizzle SWIZZLE_ONE = 5
Mapea un canal de color al valor de uno.
Descripciones de Propiedades
Enables the blending the layer using its alpha channel.
Can be combined with Viewport.transparent_bg to give the layer a transparent background.
Vector2i android_surface_size = Vector2i(1024, 1024) 🔗
The size of the Android surface to create if use_android_surface is enabled.
bool enable_hole_punch = false 🔗
Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting sort_order to a negative value) while "punching a hole" through everything rendered by Godot so that the layer is still visible.
This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Godot, allowing objects to appear to pass both behind or in front of the composition layer.
SubViewport layer_viewport 🔗
void set_layer_viewport(value: SubViewport)
SubViewport get_layer_viewport()
El SubViewport para renderizar en la capa de composición.
El orden de clasificación de esta capa de composición. Los números más altos se mostrarán delante de los más bajos.
Nota: Esto no tendrá efecto si se utiliza una malla de respaldo.
Swizzle swapchain_state_alpha_swizzle = 3 🔗
The swizzle value for the alpha channel of the swapchain state.
Note: This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
Swizzle swapchain_state_blue_swizzle = 2 🔗
The swizzle value for the blue channel of the swapchain state.
Note: This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
Color swapchain_state_border_color = Color(0, 0, 0, 0) 🔗
El color del borde del estado de la cadena de intercambio que se utiliza cuando el modo de ajuste se fija al borde.
Nota: Esta propiedad solo tiene efecto en los dispositivos que admiten las extensiones OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan.
Swizzle swapchain_state_green_swizzle = 1 🔗
The swizzle value for the green channel of the swapchain state.
Note: This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
Wrap swapchain_state_horizontal_wrap = 0 🔗
El modo de ajuste horizontal del estado de la cadena de intercambio.
Nota: Esta propiedad solo tiene efecto en los dispositivos que admiten las extensiones OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan.
Filter swapchain_state_mag_filter = 1 🔗
El filtro de magnificación del estado de la cadena de intercambio.
Nota: Esta propiedad solo tiene efecto en los dispositivos que soportan las extensiones OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan.
float swapchain_state_max_anisotropy = 1.0 🔗
La anisotropía máxima del estado de la cadena de intercambio.
Nota: Esta propiedad solo tiene efecto en los dispositivos que soportan las extensiones OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan.
Filter swapchain_state_min_filter = 1 🔗
The minification filter of the swapchain state.
Note: This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
MipmapMode swapchain_state_mipmap_mode = 2 🔗
void set_mipmap_mode(value: MipmapMode)
MipmapMode get_mipmap_mode()
El modo mipmap del estado de la cadena de intercambio.
Nota: Esta propiedad solo tiene efecto en los dispositivos que admiten las extensiones OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan.
Swizzle swapchain_state_red_swizzle = 0 🔗
The swizzle value for the red channel of the swapchain state.
Note: This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
Wrap swapchain_state_vertical_wrap = 0 🔗
The vertical wrap mode of the swapchain state.
Note: This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
bool use_android_surface = false 🔗
Si está habilitado, se creará una superficie de Android (con las dimensiones de android_surface_size) que proporcionará el contenido 2D para la capa de composición, en lugar de utilizar layer_viewport.
Véase get_android_surface() para obtener información sobre cómo obtener la superficie para que tu aplicación pueda dibujar en ella.
Nota: Esto solo funcionará en compilaciones de Android.
Descripciones de Métodos
JavaObject get_android_surface() 🔗
Returns a JavaObject representing an android.view.Surface if use_android_surface is enabled and OpenXR has created the surface. Otherwise, this will return null.
Note: The surface can only be created during an active OpenXR session. So, if use_android_surface is enabled outside of an OpenXR session, it won't be created until a new session fully starts.
Vector2 intersects_ray(origin: Vector3, direction: Vector3) const 🔗
Returns UV coordinates where the given ray intersects with the composition layer. origin and direction must be in global space.
Returns Vector2(-1.0, -1.0) if the ray doesn't intersect.
bool is_natively_supported() const 🔗
Returns true if the OpenXR runtime natively supports this composition layer type.
Note: This will only return an accurate result after the OpenXR session has started.