Skip to main content

Function: transformRgbUvToWorld()

transformRgbUvToWorld(rgbUv, depthMeshSnapshot, cameraParametersSnapshot): null | { depthInMeters: number; worldNormal: Vector3; worldPosition: Vector3; }

Defined in: src/camera/CameraUtils.ts:143

Raycasts to the depth mesh to find the world position and normal at a given UV coordinate.

Parameters

rgbUv

Vector2

The UV coordinate to raycast from.

depthMeshSnapshot

Mesh

The depth mesh to raycast against.

cameraParametersSnapshot

worldFromClip

Matrix4

worldFromView

Matrix4

Returns

null | { depthInMeters: number; worldNormal: Vector3; worldPosition: Vector3; }

The world position, normal, and depth at the given UV coordinate.