-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Meta Composition Layer tutorial doc #186
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Meta Composition Layers | ||
======================= | ||
|
||
This tutorial will walk through the Meta-specific OpenXR composition layer extensions that are supported | ||
by the Godot OpenXR Vendors plugin. For a general introduction to OpenXR composition layers in Godot, | ||
check out the `OpenXR Composition Layer Introduction <https://docs.godotengine.org/en/latest/tutorials/xr/openxr_composition_layers.html>`_ tutorial. | ||
|
||
The following extensions will expose new properties to the inspector for `OpenXRCompositionLayer <https://docs.godotengine.org/en/latest/classes/class_openxrcompositionlayer.html#class-openxrcompositionlayer>`_ nodes. | ||
|
||
Secure Content | ||
-------------- | ||
|
||
.. image:: img/composition_layers/secure_content_properties.png | ||
|
||
The ``XR_FB_composition_layer_secure_content`` extension allows users to specify how they would like a | ||
composition layer to be rendered to external outputs. This means that this setting will have **no effect** | ||
on the composition layers when viewed from inside the headset, but will take effect when casting to another device. | ||
|
||
The following ``external_output`` options are available: | ||
|
||
* ``display``: Display the content without any changes to external outputs. | ||
* ``exclude``: Hide this composition layer from external outputs, revealing content behind it. | ||
* ``replace``: Replace the content on this composition layer with a black screen. | ||
|
||
.. figure:: img/composition_layers/secure_content_example.png | ||
:align: center | ||
|
||
Example of what a composition layer looks like to an external output with the three different output modes. | ||
|
||
Filter Settings | ||
--------------- | ||
|
||
.. image:: img/composition_layers/filter_settings_properties.png | ||
|
||
The ``XR_FB_composition_layer_settings`` extension allows users to choose supersampling and sharpening | ||
processing options on a composition layer. The first section of `this Meta article <https://developer.oculus.com/documentation/native/android/mobile-openxr-composition-layer-filtering/>`_ | ||
describes what supersampling/sharpening is and why you may want to utilize these processing options; it also provides some screenshots of their effects. | ||
|
||
Supersampling and sharpening both have ``normal`` and ``quality`` options. Users are able to set supersampling/sharpening options manually, | ||
or to let the OpenXR runtime toggle between options automatically. | ||
|
||
.. note:: | ||
If ``enable_auto_filter`` is set to ``true`` and at least one of the ``options`` flags is selected, | ||
automatic layer filtering will always take precedence over manual settings. | ||
|
||
When automatic layer filtering is enabled, the runtime will only swap between disabled supersampling/sharpening, and the modes indicated by the ``options`` property. | ||
|
||
Alpha Blend | ||
----------- | ||
|
||
.. image:: img/composition_layers/alpha_blend_properties.png | ||
|
||
The ``XR_FB_composition_layer_alpha_blend`` extension provides improved control over the source and destination blend factors of composition layers, | ||
for both color and alpha. Simply turn on `enable_alpha_blend_extension` and the custom blend factors will take effect. | ||
|
||
The ``source_color_blend_factor`` and ``source_alpha_blend_factor`` properties will determine the source contributions to the blending, while | ||
``destination_color_blend_factor`` and ``destination_alpha_blend_factor`` will do the same for the destination. Each of these properties can be set to | ||
:ref:`one of six different blend factors <enum_openxrfbcompositionlayeralphablendextensionwrapper_blendfactor>`. | ||
|
||
.. figure:: img/composition_layers/alpha_blend_example.png | ||
:align: center | ||
|
||
Example of different blending results depending on alpha blend settings. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.9 KB
docs/manual/meta/img/composition_layers/filter_settings_properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.13 KB
docs/manual/meta/img/composition_layers/secure_content_properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ Meta | |
|
||
scene_manager | ||
passthrough | ||
composition_layers | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add a clear separation between the three options.
As is, it's hard to figure out at first look that the image on the left represents the selected option to the image's right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, I've added some white lines between the screenshots to help with clarity.