Skip to content

GpuRayFlags

1 min read

Import: import system.gpu;

This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation. Shader-only declarations can be used only inside @compute, @vertex, @fragment, inferred helpers and ray tracing shader functions; using them elsewhere is a compile error.

GpuRayFlags

Options for trace_ray and GpuRayQuery. Combine several with |.

public enum GpuRayFlags

None

No options.

None = 0

ForceOpaque

Treats all geometry as opaque, so any-hit shaders do not run.

ForceOpaque = 1

ForceNonOpaque

Treats all geometry as non-opaque, so any-hit shaders run for every candidate.

ForceNonOpaque = 2

AcceptFirstHitAndEndSearch

Stops at the first hit found instead of searching for the closest one, for shadow rays.

AcceptFirstHitAndEndSearch = 4

SkipClosestHitShader

Skips the closest-hit shader.

SkipClosestHitShader = 8

CullBackFacingTriangles

Ignores triangles facing away from the ray.

CullBackFacingTriangles = 16

CullFrontFacingTriangles

Ignores triangles facing the ray.

CullFrontFacingTriangles = 32

CullOpaque

Ignores opaque geometry.

CullOpaque = 64

CullNonOpaque

Ignores non-opaque geometry.

CullNonOpaque = 128

SkipTriangles

Ignores triangle geometry.

SkipTriangles = 256

SkipProceduralPrimitives

Ignores custom geometry tested by intersection shaders.

SkipProceduralPrimitives = 512