-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathOpenXRFbPassthroughExtensionWrapper.xml
226 lines (226 loc) · 11.7 KB
/
OpenXRFbPassthroughExtensionWrapper.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<?xml version="1.0" encoding="UTF-8" ?>
<class name="OpenXRFbPassthroughExtensionWrapper" inherits="OpenXRExtensionWrapperExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<brief_description>
Wraps [code]XR_FB_passthrough[/code] and related extensions.
</brief_description>
<description>
Wraps the following OpenXR extensions:
- [code]XR_FB_passthrough[/code]
- [code]XR_FB_triangle_mesh[/code]
- [code]XR_META_passthrough_preferences[/code]
- [code]XR_META_passthrough_color_lut[/code]
Only the main [code]XR_FB_passthrough[/code] extension is required for basic passthrough functionality. The others allow for more complex features, such as filtering the passthrough output or using an [OpenXRFbPassthroughGeometry] node to control where passthrough is rendered. Settings for features unsupported by the current OpenXR runtime or headset will be ignored.
Passthrough will start automatically when [member XRInterface.environment_blend_mode] is set to [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND], and will automatically stop when set to any other value.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_current_layer_purpose">
<return type="int" enum="OpenXRFbPassthroughExtensionWrapper.LayerPurpose" />
<description>
Gets the current passthrough layer purpose.
</description>
</method>
<method name="get_current_passthrough_filter">
<return type="int" enum="OpenXRFbPassthroughExtensionWrapper.PassthroughFilter" />
<description>
Gets the current passthrough filter.
</description>
</method>
<method name="get_edge_color">
<return type="Color" />
<description>
Gets the color to be drawn on top of edges that are detected in the original passthrough imagery.
Edge rendering is disabled when the alpha value of the color is zero.
</description>
</method>
<method name="get_max_color_lut_resolution">
<return type="int" />
<description>
Gets the maximum allowed resolution for color LUTs (Look Up Tables).
See [method set_color_lut] and [method set_interpolated_color_lut].
</description>
</method>
<method name="get_texture_opacity_factor">
<return type="float" />
<description>
Set the opacity of the passthrough imagery between [code]0.0[/code] and [code]1.0[/code].
</description>
</method>
<method name="has_color_passthrough_capability">
<return type="bool" />
<description>
Returns [code]true[/code] if the headset supports color passthrough; otherwise [code]false[/code], if only monochrome passthrough is supported.
This is only valid if [method has_passthrough_capability] returns [code]true[/code].
</description>
</method>
<method name="has_layer_depth_passthrough_capability">
<return type="bool" />
<description>
Returns [code]true[/code] if the headset supports passthrough layers composited using depth testing; otherwise [code]false[/code].
This is only valid if [method has_passthrough_capability] returns [code]true[/code].
</description>
</method>
<method name="has_passthrough_capability">
<return type="bool" />
<description>
Returns [code]true[/code] if the OpenXR runtime can give us extended information about passthrough capability via the [method has_color_passthrough_capability] or [method has_layer_depth_passthrough_capability] methods.
If this method returns [code]false[/code], don't trust the return value of those methods.
</description>
</method>
<method name="is_passthrough_preferred">
<return type="bool" />
<description>
Returns [code]true[/code] if the OpenXR runtime recommends that the app start in passthrough mode (if supported); otherwise [code]false[/code].
While this recommendation is platform dependent, it may, for example, return [code]true[/code] if the user was already in passthrough when they opened the app, in order to prevent the user switching from passthrough, to full VR, and back to passthrough again.
</description>
</method>
<method name="is_passthrough_started">
<return type="bool" />
<description>
Checks if passthrough has been started.
</description>
</method>
<method name="is_passthrough_supported">
<return type="bool" />
<description>
Checks if passthrough is supported.
</description>
</method>
<method name="set_brightness_contrast_saturation">
<return type="void" />
<param index="0" name="brightness" type="float" />
<param index="1" name="contrast" type="float" />
<param index="2" name="saturation" type="float" />
<description>
Sets the current passthrough filter to [constant PASSTHROUGH_FILTER_BRIGHTNESS_CONTRAST_SATURATION], which will adjust the brightness, contrast and saturation of the passthrough imagery.
- [param brightness]: brightness adjustment value in the range [code]-100[/code] to [code]100[/code]. The neutral value is [code]0[/code].
- [param contrast]: contrast adjustment value which must be greater than [code]0[/code]. The neutral value is [code]1.0[/code].
- [param saturation]: saturation adjustment value which must be greater than [code]0[/code]. The neutral value is [code]1.0[/code].
[b]Note:[/b] Only one passthrough filter can be enabled at a time.
</description>
</method>
<method name="set_color_lut">
<return type="void" />
<param index="0" name="weight" type="float" />
<param index="1" name="color_lut" type="OpenXRMetaPassthroughColorLut" />
<description>
Sets the current passthrough filter to [constant PASSTHROUGH_FILTER_COLOR_MAP_LUT], which will use the [OpenXRMetaPassthroughColorLut] to map from the colors in the passthrough imagery into colors from the LUT (Look Up Table).
The [param weight] is a value between [code]0.0[/code] and [code]1.0[/code], which can be used to blend linearly between the original colors and the mapped colors.
[b]Note:[/b] Only one passthrough filter can be enabled at a time.
</description>
</method>
<method name="set_color_map">
<return type="void" />
<param index="0" name="gradient" type="Gradient" />
<description>
Sets the current passthrough filter to [constant PASSTHROUGH_FILTER_COLOR_MAP], which will use the given gradient to replace each input luminance value in the passthrough imagery with an RGBA color value.
[b]Note:[/b] Only one passthrough filter can be enabled at a time.
</description>
</method>
<method name="set_edge_color">
<return type="void" />
<param index="0" name="color" type="Color" />
<description>
Sets a color to be drawn on top of edges that are detected in the original passthrough imagery.
Edge rendering is disabled when the alpha value of the color is zero.
</description>
</method>
<method name="set_interpolated_color_lut">
<return type="void" />
<param index="0" name="weight" type="float" />
<param index="1" name="source_color_lut" type="OpenXRMetaPassthroughColorLut" />
<param index="2" name="target_color_lut" type="OpenXRMetaPassthroughColorLut" />
<description>
Sets the current passthrough filter to [constant PASSTHROUGH_FILTER_COLOR_MAP_INTERPOLATED_LUT], which will use the given [OpenXRMetaPassthroughColorLut] objects to map from the colors in the passthrough imagery into colors interpolated between the two LUTs (Look Up Tables).
The [param weight] is a value between [code]0.0[/code] and [code]1.0[/code], which can be used to blend linearly between the colors from the two [OpenXRMetaPassthroughColorLut] objects. This can be used to smoothly transition from using one [OpenXRMetaPassthroughColorLut] to another.
[b]Note:[/b] Only one passthrough filter can be enabled at a time.
</description>
</method>
<method name="set_mono_map">
<return type="void" />
<param index="0" name="curve" type="Curve" />
<description>
Sets the current passthrough filter to [constant PASSTHROUGH_FILTER_MONO_MAP], which will use the given curve to replace each input luminance value in the passthrough imagery with a grayscale color value.
[b]Note:[/b] Only one passthrough filter can be enabled at a time.
</description>
</method>
<method name="set_passthrough_filter">
<return type="void" />
<param index="0" name="filter" type="int" enum="OpenXRFbPassthroughExtensionWrapper.PassthroughFilter" />
<description>
Sets the current passthrough filter.
The filter type can also be changed by calling any of the following methods:
- [method set_color_map]
- [method set_mono_map]
- [method set_brightness_contrast_saturation]
- [method set_color_lut]
- [method set_interpolated_color_lut]
However, the only way to disable the passthrough filter is by calling this method with [constant PASSTHROUGH_FILTER_DISABLED].
</description>
</method>
<method name="set_texture_opacity_factor">
<return type="void" />
<param index="0" name="value" type="float" />
<description>
Set the opacity of the passthrough imagery between [code]0.0[/code] and [code]1.0[/code].
</description>
</method>
</methods>
<signals>
<signal name="openxr_fb_passthrough_state_changed">
<param index="0" name="event_type" type="int" />
<description>
Emitted when the passthrough state has changed.
</description>
</signal>
<signal name="openxr_fb_passthrough_stopped">
<description>
Emitted when passthrough has stopped.
</description>
</signal>
<signal name="openxr_fb_projected_passthrough_layer_created">
<description>
Emitted when a projected passthrough layer has been created.
</description>
</signal>
</signals>
<constants>
<constant name="LAYER_PURPOSE_NONE" value="-1" enum="LayerPurpose">
Passthrough layer is disabled.
</constant>
<constant name="LAYER_PURPOSE_RECONSTRUCTION" value="0" enum="LayerPurpose">
Full environment is presented on the passthrough layer.
</constant>
<constant name="LAYER_PURPOSE_PROJECTED" value="1" enum="LayerPurpose">
Passthrough is projected on custom geometry and presented on the passthrough layer.
</constant>
<constant name="PASSTHROUGH_FILTER_DISABLED" value="0" enum="PassthroughFilter">
Passthrough filter is disabled.
</constant>
<constant name="PASSTHROUGH_FILTER_COLOR_MAP" value="1" enum="PassthroughFilter">
Filter passthrough using a color map. See [method set_color_map].
</constant>
<constant name="PASSTHROUGH_FILTER_MONO_MAP" value="2" enum="PassthroughFilter">
Filter passthrough using a mono map. See [method set_mono_map].
</constant>
<constant name="PASSTHROUGH_FILTER_BRIGHTNESS_CONTRAST_SATURATION" value="3" enum="PassthroughFilter">
Filter passthrough using brightness, contrast and saturation. See [method set_brightness_contrast_saturation].
</constant>
<constant name="PASSTHROUGH_FILTER_COLOR_MAP_LUT" value="4" enum="PassthroughFilter">
Filter passthrough using a color LUT (Look Up Table). See [method set_color_lut].
</constant>
<constant name="PASSTHROUGH_FILTER_COLOR_MAP_INTERPOLATED_LUT" value="5" enum="PassthroughFilter">
Filter passthrough using an interpolated color LUT (Look Up Table). See [method set_interpolated_color_lut].
</constant>
<constant name="PASSTHROUGH_ERROR_NON_RECOVERABLE" value="0" enum="PassthroughStateChangedEvent">
A non-recoverable error has occurred. A device reboot or firmware update may be required.
</constant>
<constant name="PASSTHROUGH_ERROR_RECOVERABLE" value="1" enum="PassthroughStateChangedEvent">
A recoverable error has occurred. The OpenXR runtime will attempt to recover, but some functionality may be temporarily unavailable.
</constant>
<constant name="PASSTHROUGH_ERROR_RESTORED" value="2" enum="PassthroughStateChangedEvent">
The runtime has recovered from a previous error and is functioning normally.
</constant>
</constants>
</class>