ObjectRayDirection

Description

Returns the ray direction in object space of the current instance.

Signature

vector<float, 3> ObjectRayDirection();

Return value

Object-space direction vector of the ray

Remarks

Transformed by the inverse of the instance transform. On CUDA/OptiX, only available in anyhit and intersection stages.

Availability and Requirements

Defined for the following targets:

hlsl

Available in stages: intersection, anyhit, closesthit.

glsl

Available in stages: intersection, anyhit, closesthit.

cuda

Available in stages: intersection, anyhit.

spirv

Available in stages: intersection, anyhit, closesthit.

Requires capability: spvRayTracingKHR.