Layer

Edit

A Layer is a textured plane placed in 3D space. Layers are sent directly to the VR runtime and composited along with the rest of the 3D content. This has several advantages compared to rendering the texture into the 3D scene with Pass:draw:

Combined, all of this makes a massive difference in quality when rendering 2D content on a Layer, especially improving text readability.

Note that currently the VR simulator does not support layers.

Constructor

lovr.headset.newLayerCreate a new Layer.

Methods

Layer:getColorGet the color of the layer.
Layer:getCurveGet the curve of the layer.
Layer:getDimensionsGet the size of the layer.
Layer:getOrientationGet the orientation of the layer.
Layer:getPassGet the render pass for the layer.
Layer:getPoseGet the pose of the layer.
Layer:getPositionGet the position of the layer.
Layer:getTextureGet the texture for the layer.
Layer:getViewportGet the viewport of the layer.
Layer:setColorSet the color of the layer.
Layer:setCurveSet the curve of the layer.
Layer:setDimensionsSet the size of the layer.
Layer:setOrientationSet the orientation of the layer.
Layer:setPoseSet the pose of the layer.
Layer:setPositionSet the position of the layer.
Layer:setViewportSet the viewport of the layer.

See also