Xrvrs
Helper class for XR interfaces that generates VRS images.
Helper class for XR interfaces that generates VRS images.
This class is used by various XR interfaces to generate VRS textures that can be used to speed up rendering.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
XrvrsConstructor
public Xrvrs();Properties3
VrsMinRadiusProperty
public float VrsMinRadius { get; set; }The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size.
VrsRenderRegionProperty
public Rect2I VrsRenderRegion { get; set; }The render region that the VRS texture will be scaled to when generated.
VrsStrengthProperty
public float VrsStrength { get; set; }The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is.
Methods8
GetVrsMinRadiusfloat
public float GetVrsMinRadius();floatGetVrsRenderRegionRect2I
public Rect2I GetVrsRenderRegion();Rect2IGetVrsStrengthfloat
public float GetVrsStrength();floatMakeVrsTexture2 overloads
public Rid MakeVrsTexture(Vector2 targetSize, Vector2[] eyeFoci);Generates the VRS texture based on a render target_size adjusted by our VRS tile size. For each eyes focal point passed in eye_foci a layer is created. Focal point should be in NDC.
The result will be cached, requesting a VRS texture with unchanged parameters and settings will return the cached RID.
| Name | Type | Default |
|---|---|---|
targetSize | Vector2 | — |
eyeFoci | Vector2[] | — |
Ridpublic Rid MakeVrsTexture(Vector2 targetSize, ReadOnlySpan<Vector2> eyeFoci);Generates the VRS texture based on a render target_size adjusted by our VRS tile size. For each eyes focal point passed in eye_foci a layer is created. Focal point should be in NDC.
The result will be cached, requesting a VRS texture with unchanged parameters and settings will return the cached RID.
| Name | Type | Default |
|---|---|---|
targetSize | Vector2 | — |
eyeFoci | ReadOnlySpan<Vector2> | — |
RidSetVrsMinRadiusvoid
public void SetVrsMinRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetVrsRenderRegionvoid
public void SetVrsRenderRegion(Rect2I renderRegion);| Name | Type | Default |
|---|---|---|
renderRegion | Rect2I | — |
SetVrsStrengthvoid
public void SetVrsStrength(float strength);| Name | Type | Default |
|---|---|---|
strength | float | — |