lovr.graphics.newRaytracer

Edit

Creates a new Raytracer, which holds objects for raytracing in shaders. The capacity of the raytracer, the number of objects it can hold, must be declared upfront and can not be changed afterwards.

raytracer = lovr.graphics.newRaytracer(capacity, options)

Arguments

NameTypeDefaultDescription
capacitynumber The capacity of the Raytracer.
optionstable Optional options.
.dynamicbooleanfalse An optimization hint indicating that the Raytracer will be frequently rebuilt with new objects or transform changes. Set this to false for raytracers that have static content.
.fasttracebooleantrue An optimization hint indicating that the Raytracer should be optimized for fast tracing in shaders instead of fast rebuilds.
.fastbuildbooleanfalse An optimization hint indicating that the Raytracer should be optimized for fast rebuilds instead of fast tracing. If fasttrace and fastbuild are both set, fasttrace wins.
.compressbooleanfalse An optimization hint indicating that the Raytracer should use less VRAM, possibly at the cost of performance.

Returns

NameTypeDescription
raytracerRaytracer The new Raytracer.

See also