Befor UE OpenXR module, if we have a custom stereo layer shape not pre defined in ue like below.
[Image Removed]We can define the custom layer shape on our plugin and we can create custom compositor layer according to the custom layer shape in our own hmd module like below. Because we can access the custom layer shape from IStereoLayers
virtual IStereoLayers* GetStereoLayers() override { return this; }
virtual uint32 CreateLayer(const IStereoLayers::FLayerDesc& InLayerDesc) override;
virtual void DestroyLayer(uint32 LayerId) override;
virtual void SetLayerDesc(uint32 LayerId, const IStereoLayers::FLayerDesc& InLayerDesc) override;
virtual bool GetLayerDesc(uint32 LayerId, IStereoLayers::FLayerDesc& OutLayerDesc) override;
virtual void MarkTextureForUpdate(uint32 LayerId) override;
We can get the FLayerDesc.
[Image Removed]Now under ue openxr framework, ue openxr hmd module take over to create XrCompositionLayer in FXrCompositionLayerUnion. [Image Removed]Currently we also can create custom xr compositor layer in our plugin,but we can’t easily query the specific stereo layer shape and custom flags to link to the custom xr compositor layer. Sometimes we want to extent the next on some xr layer‘’s next , sometimes we won‘t let ue create xr layer instead we create in external plugins。Do you know what is the best way to do that?
So my proposal is that we can add two APIs in IOpenXRExtensionPlugin. Blow is the example:
- First try to let external plugin create xr layer based on Desc.
- If external plugins didn’t create success
- Then create by ue
- If crated by ue give the external plugin ability to extend the layer’s next according to some custom flags on Desc.
[Image Removed]PR:https://github.com/EpicGames/UnrealEngine/pull/14475
[Attachment Removed]