Docs / Ray tracing

Glossary: RayTracingFlags

The values of RayTracingFlags.

The queries an instance takes part in, and the ones a query asks for.

A set of flags: the values combine.

An enum, in the namespace BorrowedTorch.RayTracing: the type of Flags and of a query’s mask. A query sees only the instances that carry every flag in its mask. The GPU reads the same bits in Flags, and RayTraversal.fxh names two of them. The scene page shows it in context, with code.

Values

None →

  1. No flags. As a mask, every instance is seen: the default of Intersect and IntersectAny. An instance declared with it is seen only by queries with no mask.

CastsShadow →

  1. Blocks shadow rays. RT_FLAG_CASTS_SHADOW on the GPU.

VisibleToGI →

  1. Takes part in indirect light: bounced light, reflections, traced ambient occlusion. RT_FLAG_VISIBLE_TO_GI on the GPU.

Pickable →

  1. Can be picked by a ray from the cursor. For the CPU: picking never runs on the GPU, and RayTraversal.fxh has no name for it.

Default →

7, CastsShadow | VisibleToGI | Pickable. What Tlas.Add gives an instance unless told otherwise.