OpenXRMetaEnvironmentDepth
Inherits: VisualInstance3D
Populates Godot's depth buffer with reprojected data from the XR_META_environment_depth
extension.
Description
Populates Godot's depth buffer with reprojected data from the XR_META_environment_depth
extension, which will (by default) allow everything rendered by Godot to be occluded by real world objects.
If you want certain objects to not be occluded, set the render_priority
on their materials to a value lower than render_priority so they're rendered before this node fills the depth buffer. If that isn't flexible enough for your needs, you can write your own shaders that directly use the environment depth data.
NOTE: All transparent objects are always rendered after all opaque objects, so there is no render_priority
value that can cause a transparent object to be rendered before this node.
Properties
int |
|
|
float |
|
|
float |
|
Property Descriptions
int render_priority = -50
void set_render_priority ( int value )
int get_render_priority ( )
Determines the order this node will be rendered relative to other objects in the scene. Lower values will be rendered earlier.
float reprojection_offset_exponent = 1.0
void set_reprojection_offset_exponent ( float value )
float get_reprojection_offset_exponent ( )
Used in calculating the offset applied to reprojected data, if reprojection_offset_scale is greater than 0.0
.
float reprojection_offset_scale = 0.005
void set_reprojection_offset_scale ( float value )
float get_reprojection_offset_scale ( )
If greater than 0.0
, an offset will be applied to the reprojected environment depth data, moving the depth of real world objects further away.
The amount of offset is relative to the distance from the camera:
var offset = pow(z_distance_from_camera, reprojection_offset_exponent) * reprojection_offset_scale