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
| Name | Type | Default | Description |
| capacity | number | |
The capacity of the Raytracer.
|
| options | table | |
Optional options.
|
| .dynamic | boolean | false |
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.
|
| .fasttrace | boolean | true |
An optimization hint indicating that the Raytracer should be optimized for fast tracing in shaders instead of fast rebuilds.
|
| .fastbuild | boolean | false |
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.
|
| .compress | boolean | false |
An optimization hint indicating that the Raytracer should use less VRAM, possibly at the cost of performance.
|
Returns
| Name | Type | Description |
| raytracer | Raytracer |
The new Raytracer.
|
See also