XRVRS
Inherits: Object
Description
Section titled “Description”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.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| float | vrs_min_radius |
20.0 |
| Rect2i | vrs_render_region |
Rect2i(0, 0, 0, 0) |
| float | vrs_strength |
1.0 |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| RID | make_vrs_texture(target_size: Vector2, eye_foci: PackedVector2Array) |
Property descriptions
Section titled “Property descriptions”vrs_min_radius
float vrs_min_radius = 20.0
The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size.
vrs_render_region
Rect2i vrs_render_region = Rect2i(0, 0, 0, 0)
The render region that the VRS texture will be scaled to when generated.
vrs_strength
float vrs_strength = 1.0
The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is.
Method descriptions
Section titled “Method descriptions”make_vrs_texture
RID make_vrs_texture(target_size: Vector2, eye_foci: PackedVector2Array)
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.
