Class HDRTonemappingExtension
Subclass of CompositionLayerExtension that describes the HDR encoding of the source texture of the CompositionLayer instance on the same game object: its color gamut, the luminance of paper white, and its maximum luminance.
Providers that support HDR output use these values to convert the layer's content for the display. Editor emulation also uses them when the Game view outputs HDR. Support for this component is up to the instance of ILayerProvider currently assigned to the CompositionLayerManager; the OpenXR provider ignores it.
If this extension is not added to a layer game object, the layer's source texture is treated as not HDR-encoded.
Inheritance
Inherited Members
Namespace: Unity.XR.CompositionLayers.Extensions
Assembly: Unity.XR.CompositionLayers.dll
Syntax
[ExecuteAlways]
[DisallowMultipleComponent]
[AddComponentMenu("XR/Composition Layers/Extensions/HDR Tonemapping")]
public class HDRTonemappingExtension : CompositionLayerExtension
Properties
ColorGamut
The value used to color gamut for the source texture.
Declaration
public ColorGamut ColorGamut { get; set; }
Property Value
| Type | Description |
|---|---|
| ColorGamut |
MaxDisplayNits
The value used to describe max display nits for the source texture.
Declaration
public int MaxDisplayNits { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
NitsForPaperWhite
The value used to describe nits for paper white for the source texture.
Declaration
public int NitsForPaperWhite { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Target
Gets the target of the extension, which is a layer.
Declaration
public override CompositionLayerExtension.ExtensionTarget Target { get; }
Property Value
| Type | Description |
|---|---|
| CompositionLayerExtension.ExtensionTarget |
Overrides
Methods
GetNativeStructPtr()
Retrieves a pointer to the native structure.
Declaration
public override void* GetNativeStructPtr()
Returns
| Type | Description |
|---|---|
| void* | A null pointer as this extension does not use a native structure. |