v0.18.0
EditLÖVR v0.18.0, codename Dream Eater, was released on February 14th, 2025. This version has been 490 days in the making, with 899 commits from 8 authors.
The main highlight of this release is a brand new physics engine, Jolt Physics! In addition to tons of new physics features, this version also added:
- Fixed Foveated Rendering
- OpenXR Compositor Layers
- Stylus Input
- BMFont
- Filesystem Watching
- Shader Code Improvements
Grab a snack and get comfortable, hopefully the rest of this doesn't put you to sleep!
Contents
Jolt Physics
This version LÖVR switched from using the venerable ODE to Jolt Physics. Jolt is faster, more
stable, multithreaded, and deterministic. There were also lots of new features and improvements
added to the lovr.physics API as part of the switch.
Shapecasts
Shapecasts are similar to raycasts, except instead of detecting collision along a line they sweep a whole shape through the scene and find anything it touches. They're very helpful for player locomotion and projectile hit tests.
Continuous Collision Detection
Normally the physics engine will compute a new position for a collider, and then detect and resolve any collisions at the new location. This usually works fine, but fast-moving objects can pass through walls if they move fully through through them during one physics step:

CCD (continuous collision detection) is a technique that solves this problem by checking for
collisions along the object's whole path, instead of just checking the final position. It's great
for fast moving projectiles. Just call Collider:setContinuous on any colliders that need CCD.
Axis Locking
It's now possible to lock translation and rotation of a Collider on specific axes with
Collider:setDegreesOfFreedom. Previously this required hacks like setting very high damping.
It's nice for keeping objects upright, or for an object that only needs to move in one direction,
like elevators.
Collision Callbacks
There is a new World:setCallbacks function that lets you set callbacks when various collision
events occur. There are 4 different callbacks:
filterlets you filter collisions with Lua code. It can be used when the tag system isn't powerful enough to express when objects should collide.enteris fired when 2 objects start touching, useful for playing sounds or spawning particles.exitis fired when 2 objects stop touching.contactis fired every frame while 2 objects are touching. This can be useful to adjust the friction dynamically or break contact if some condition is met.
The enter and contact callbacks receive a Contact object which has lots of useful information
about the collision, including the exact Shapes that are touching, how much they're overlapping, the
contact points, and the contact normal.
These callbacks replace the older method that used a callback in World:update, along with
World:overlaps and World:collide. World:getContacts is also superseded by the more powerful
Contact object.
MeshShape Improvements
MeshShape has received a lot of improvements. First, it's been split into 2 shapes! Now,
MeshShape is a kinematic-only shape like TerrainShape, intended to be used for static level
geometry.
For dynamic objects with arbitrary shapes, ConvexShape is a new shape that represents a "convex
hull" of a triangle mesh. ConvexShape can be created from all the same things as MeshShape can, but
it won't tank the performance of the simulation like MeshShape used to do.
Also, it's possible to create copies of MeshShape and ConvexShape. The copies will reuse the
mesh data from the original shape, and they can have a different scale. This makes it possible to
stamp out copies of objects with complex collision meshes without any frame hitches.
Raycast Triangles
World:raycast now returns the triangle that was hit for MeshShapes. This can be used to look up
other vertex data like UVs, which lets you do things like paint on a Model!
Raycast Filters
All physics queries like raycasts and shapecasts now take a list of tags to filter by. Narrowing down the set of objects that the physics engine needs to check like this can give a big speedup when doing lots of collision queries on a dense scene!
-- Only check if we hit an enemy or a wall, skip everything else
world:raycast(from, to, 'enemy wall')
-- Ignore hits on sensors
world:raycast(from, to, '~sensor')
Joints
There are 2 new types of joints:
WeldJointglues two colliders together, restricting all movement between them.ConeJointallows two colliders to rotate a fixed angle away from each other, good for ropes.
Breakable Joints
Breakable joints are now supported! Joint:getForce and Joint:getTorque return the amount of
force/torque the physics engine is using to enforce the joint's constraint, allowing the joint to be
disabled or destroyed when the force gets too high.
Springs
DistanceJoint, HingeJoint, and SliderJoint now have :setSpring methods, which make their
limits "soft" and bouncy. Hinge and slider joints also have :setFriction which causes them to
require some extra force to move.
Motors
Hinge and slider joints have motors now. The motor can be used to move the joint back to a desired position or rotation, or to get it to move at a target speed. The motor has a maximum amount of force it can apply, and has its own springiness. Motors are useful when designing robots or other physics-based animation rigs.
Fixed Timestep
A new World:interpolate function makes it much easier to implement fixed-timestep physics
simulation, where the physics loop is run at a different rate than the normal frame loop.
Above, both simulations are running at 15Hz, but the version on the right uses World:interpolate
to smooth out the collider poses between the last 2 physics steps.
Layers
The headset module now supports composition layers, exposed as a new Layer object. Layers are 2D
"panels" placed in 3D space. This might seem redundant, since you can already draw a texture in 3D
space with Pass:draw, but layers have several important benefits:
- Quality: Layers look MUCH better than textures rendered in the 3D scene. This is because the system renders the layer content after lens distortion is applied to the 3D scene, so the layer pixels are sampled more accurately. The layer can also use a higher resolution than the main display texture. All of this combined means text is especially more legible when drawn to a layer.
- Stability: The system is responsible for rendering the layer, and this happens much later in the composition process. Because of this, the system is able to use a more accurate head pose to position the layer, and this makes them feel much more stable, further improving text legibility.
Layers can also be curved. Pictured below is the lovr-neovim
library that renders a neovim editor on a curved panel in front of you:

In addition to the Layer object, there is also a new lovr.headset.setBackground function, which
uses the same techniques but for a skybox (cubemap or equirectangular). For static backgrounds this
can reduce rendering costs significantly, since the main headset pass doesn't need to render the
background at all, which uses a significant amount of time on mobile GPUs.
Fixed Foveated Rendering
Fixed foveated rendering is an optimization that renders at a lower resolution around the edges of
the display. The drop in quality is often imperceptible due to lens distortion, but the GPU savings
can be as high as 40% for scenes with heavy pixel shading! It's really easy to enable, just call
lovr.headset.setFoveation:
lovr.headset.setFoveation('medium', true)
The second parameter defaults to true and specifies whether the system is allowed to dynamically
lower the foveation level based on GPU load.
Stylus Input
There is a new stylus device for pens like the Logitech MX Ink. The device exposes a 3D pose,
velocity, a pressure-sensitive nib axis, and the 3 buttons on the pen.
BMFont
In addition to TTF fonts, LÖVR now supports BMFont fonts. BMFont files contain an atlas of glyph
images, along with a small text file containing metadata. Compared to the existing MSDF fonts,
BMFonts look better and are more efficient for 2D text, making them a great fit for rendering text
on the new Layer objects. Since the image atlas can contain anything, they can also be used for
icons/emoji. However, they don't support scaling like MSDF fonts do, so they can get blurry when
rendering text in 3D space.

Live Reloading
LÖVR has built in filesystem monitoring now! Simply add the --watch command line argument:
lovr --watch .
When watching is enabled, the lovr.filechanged callback will be fired whenever a file changes.
The default implementation restarts the project with lovr.event.restart, but you can override it
to ignore certain files or perform more granular asset reloading without performing a full restart.
Under the hood this uses efficient native APIs for filesystem events, so it's more lightweight and
responsive than polling file modification times with lovr.filesystem.getLastModified.
Shader Improvements
There have been a ton of tiny improvements to the shader syntax. These are all optional, so existing shaders will continue to work.
First, uniform variables no longer require the set and binding decorations:
// Old
layout(set = 2, binding = 0) uniform texture2D sparkles;
// New
uniform texture2D sparkles;
Vertex attributes no longer require location decorations:
// Old
layout(location = 0) in vec3 displacement;
// New
in vec3 displacement;
Instead of a Constants block, regular uniform variables are supported. This makes it easier to
port code from other shaders.
// Old
Constants {
vec3 direction;
float radius;
vec2 size;
};
// New
uniform vec3 direction;
uniform float radius;
uniform vec2 size;
Uniform and storage buffers support a scalar layout, which removes confusing padding requirements
and doesn't require Buffer formats to specify a std140 or std430 layout:
layout(scalar) uniform Light {
vec3 direction;
vec3 color;
};
// newBuffer({{ 'direction', 'vec3' }, { 'color', 'vec3' }}) works!
// No need for { layout = 'std140' }
There is also a new raw flag in lovr.graphics.newShader which will create a completely raw
shader without any of the LÖVR helpers:
lovr.graphics.newShader([[
in vec3 position;
void main() {
gl_Position = vec4(position, 1);
}
]], [[
out vec4 pixel;
void main() {
pixel = vec4(1, 0, 1, 1);
}
]], { raw = true })
Small Stuff
The lovr.headset.isMounted getter and lovr.mount callback are back! These tell you whether the
headset is currently on someone's head, using the proximity sensor.
There's a new File object which can be used to do multiple file operations on a file without
having to reopen it every time, or for partial reads/writes.
Quat has new methods for working with euler angles: Quat:getEuler and Quat:setEuler.
Channel:push supports Lua tables now!
Cubemap arrays are supported: cube textures can be created with any layer count as long as it's a
multiple of 6.
MSAA textures can now use sample counts of 2, 8, and 16 (instead of just 1 and 4), and they can be
correctly sent to multisample shader variables like texture2DMSAA. Additionally, Pass:setCanvas
accepts a set of resolve attachments that can be used to do custom MSAA resolves.
Texture, Shader, and Pass can be created with debug labels, which will show in graphics
debuggers like RenderDoc.
The lovr executable is now shipped as a zip archive on all platforms, with the nogame screen and
command line parser packaged like a regular fused project. This makes it easy to customize the
nogame screen, or extend the CLI with new options. It's even possible to put Lua libraries in the
zip, which will be globally accessible to all projects run with that copy of LÖVR.
Community

- There are unit tests now! Just run
lovr testin the repository. - There is a changelog now! See
CHANGES.mdin the repository. - There are new
x86_64Android CI builds for Magic Leap 2. - immortalx made ARKANOID EVO, freecell, and sudoku
- josip pushed a major update to chui, a diegetic UI library.
- micouay wrote 2 blog posts: Drag & drop in VR with LÖVR and My LÖVR workflow.
- Udinanon made a gaussian splat viewer: Gaussian Splatting viewer in OpenGL, using LOVR
- Udinanon made a spherical harmonics viewer: Spherical Harmonics and surfaces, an attempt
- xiejiangzhi released imgui bindings and a tracy integration.
Changelog
Add
General
- Add support for declaring objects as to-be-closed variables in Lua 5.4.
Filesystem
- Add
--watchCLI flag,lovr.filechangedevent, andlovr.filesystem.watch/unwatch. - Add
Fileobject andlovr.filesystem.newFile. - Add
lovr.filesystem.getBundlePath(for internal boot code). - Add
lovr.filesystem.setSource(for internal boot code).
Graphics
- Add
Pass:polygon. - Add
Shader:hasVariable. - Add support for BMFont in
FontandRasterizer. - Add support for
uniformvariables in shader code. - Add support for cubemap array textures.
- Add support for transfer operations on texture views.
- Add support for nesting texture views (creating a view of a view).
- Add
sn10x3DataType. - Add
borderWrapMode. - Add support for loading glTF models with 8 bit indices.
- Add support for
d24texture format. - Add support for
SampleID,SampleMaskIn,SampleMask, andSamplePositionin pixel shaders. - Add support for
layout(scalar)buffers andpackedBuffersgraphics feature. - Add
rawflag tolovr.graphics.newShader. - Add
Texture:getLabel,Shader:getLabel, andPass:getLabel. - Add
Model:resetBlendShapes.
Headset
- Add
Layerobject,lovr.headset.newLayer, andlovr.headset.get/setLayers. - Add
lovr.headset.setBackground. - Add
stylusDevice,nibDeviceButton, andnibDeviceAxis. - Add support for Logitech MX Ink input.
- Add
lovr.headset.get/setFoveation. - Add
t.headset.controllerskeletonto control how controllers return hand tracking data. - Add
controllerfield to the table returned bylovr.headset.getSkeleton. - Add
t.headset.mask. - Add back
lovr.headset.isMountedand thelovr.mountcallback. - Add
lovr.headset.stop,lovr.headset.isActive, andt.headset.start. - Add
lovr.headset.getFeatures. - Add
t.headset.debugto enable additional messages from the VR runtime. - Add
--simulatorCLI flag to force use of simulator headset driver. - Add
lovr.headset.getHandles.
Math
- Add
Quat:get/setEuler.
Physics
- Add variant of
lovr.physics.newWorldthat takes a table of settings. - Add
World:interpolate. - Add
World:get/setCallbacksandContactobject. - Add
World:getColliderCount. - Add
World:getJointCountandWorld:getJoints. - Add
World:shapecast. - Add
World:overlapShape. - Add
Collider:get/setGravityScale. - Add
Collider:is/setContinuous. - Add
Collider:get/setDegreesOfFreedom. - Add
Collider:applyLinearImpulseandCollider:applyAngularImpulse. - Add
Collider:moveKinematic. - Add
Collider:getShape. - Add
Collider:is/setSensor(replacesShape:is/setSensor). - Add
Collider:get/setInertia. - Add
Collider:get/setCenterOfMass. - Add
Collider:get/setAutomaticMass. - Add
Collider:resetMassData. - Add
Collider:is/setEnabled. - Add
ConvexShape. - Add
WeldJoint. - Add
ConeJoint. - Add
Joint:getForceandJoint:getTorque. - Add
Joint:get/setPriority. - Add
Joint:isDestroyed. - Add
DistanceJoint:get/setLimits. - Add
:get/setSpringtoDistanceJoint,HingeJoint, andSliderJoint. - Add
HingeJoint:get/setFrictionandSliderJoint:get/setFriction. - Add
SliderJoint:getAnchors. - Add
Shape:raycastandShape:containsPoint. - Add
Shape:get/setDensity. - Add
Shape:getMass/Volume/Inertia/CenterOfMass. - Add
Shape:get/setOffset. - Add motor support to
HingeJointandSliderJoint. - Add support for creating a
MeshShapefrom aModelData.
System
- Add
lovr.system.isWindowVisibleandlovr.system.isWindowFocused. - Add
lovr.system.wasMousePressedandlovr.system.wasMouseReleased. - Add
lovr.system.get/setClipboardText. - Add
lovr.system.openConsole(for internal Lua code). - Add
KeyCodes for numpad keys.
Thread
- Add table support to
Channel:push. - Add
lovr.thread.newChannel. - Add
t.thread.workersto configure number of worker threads.
Change
- Change nogame screen to be bundled as a fused zip archive.
- Change
Mesh:setMaterialto also take aTexture. - Change shader syntax to no longer require set/binding numbers for buffer/texture variables.
- Change
Texture:getFormatto also return whether the texture is linear or sRGB. - Change
Texture:setPixelsto allow copying between textures with different formats. - Change
Readback:getImageandTexture:getPixelsto return sRGB images when the source Texture is sRGB. - Change
lovr.graphics.newTextureto use a layer count of 6 when type iscubeand only width/height is given. - Change
lovr.graphics.newTextureto default mipmap count to 1 when an Image is given with a non-blittable format. - Change
lovr.graphics.newTextureto error if mipmaps are requested and an Image is given with a non-blittable format. - Change
TextureFeatureto mergesamplewithfilter,renderwithblend, andblitsrc/blitdstintoblit. - Change headset simulator movement to slow down when holding the control key.
- Change headset simulator to use
t.headset.supersample. - Change
lovr.graphics.compileShaderto take/return multiple stages. - Change maximum number of physics tags from 16 to 31.
- Change
TerrainShapeto require square dimensions. - Change
MeshShapeconstructors to accept aMeshShapeto reuse data from. - Change
MeshShapeconstructors to take an optional scale to apply to the vertices. - Change
Buffer:setDatato use more consistent rules to read data from tables. - Change
World:queryBox/querySphereto perform coarse AABB collision detection (useWorld:overlapShapefor an exact test). - Change
World:queryBox/querySphereto take an optional set of tags to include/exclude. - Change
World:queryBox/querySphereto return the first collider detected, when the callback is nil. - Change
World:queryBox/querySphereto return nil when a callback is given. - Change
World:raycastto take a set of tags to allow/ignore. - Change
World:raycastcallback to be optional (if nil, the closest hit will be returned). - Change
World:raycastto also return the triangle that was hit on MeshShapes. - Change physics queries to report colliders in addition to shapes.
- Change
tostringon objects to also include their pointers. - Change
desktopHeadsetDriver to be namedsimulator. - Change
--graphics-debugCLI flag to be named--debug. - Change
--versionandlovr.getVersionto also return the git commit hash. - Change
Pass:setViewport/Scissorto be per-draw state instead of per-pass. - Change
Image:get/set/mapPixelto supportr16f,rg16f, andrgba16f. - Change
Image:getPixelto return 1 for alpha when the format doesn't have an alpha component. - Change stack size of
statestack (used withPass:push/pop) from 4 to 8. - Change
lovr.focusandlovr.visibleto also get called for window events. - Change
lovr.focusandlovr.visibleto have an extra parameter for the display type.
Fix
- Fix
t.headset.submitdepthto actually submit depth. - Fix depth write when depth testing is disabled.
- Fix "morgue overflow" error when creating or destroying large amounts of textures at once.
- Fix
Texture:getTypewhen used with texture views. - Fix possible negative
dtin lovr.update when restarting with the simulator. - Fix issue where
Collider/Shape/Jointuserdata wouldn't get garbage collected. - Fix OBJ triangulation for faces with more than 4 vertices.
- Fix possible crash when using vectors in multiple threads.
- Fix possible crash with
Blob:getName. - Fix issue when sampling from depth-stencil textures.
- Fix bug when rendering meshes from
Model:getMesh. - Fix bug with
Curve:slicewhen curve has more than 4 points. - Fix bug with
hand/*/pinchandhand/*/pokedevice poses. - Fix bug when loading glTF models that use the
KHR_texture_transformextension.
Deprecate
- Deprecate
World:get/setTightness(usestabilizationoption when creating World). - Deprecate
World:get/setLinearDamping(useCollider:get/setLinearDamping). - Deprecate
World:get/setAngularDamping(useCollider:get/setAngularDamping). - Deprecate
World:is/setSleepingAllowed(useallowSleepoption when creating World). - Deprecate
World:get/setStepCount(usepositionSteps/velocityStepsoption when creating World). - Deprecate
Collider:is/setGravityIgnored(useCollider:get/setGravityScale).
Remove
- Remove
lovr.headset.getOriginType(uselovr.headset.isSeated). - Remove
lovr.headset.getDisplayFrequency(renamed tolovr.headset.getRefreshRate). - Remove
lovr.headset.getDisplayFrequencies(renamed tolovr.headset.getRefreshRates). - Remove
lovr.headset.setDisplayFrequency(renamed tolovr.headset.setRefreshRate). - Remove
lovr.graphics.getBuffer(uselovr.graphics.newBuffer). - Remove variant of
lovr.graphics.newBufferthat takes length first (format is first now). - Remove
locationkey for Buffer fields (usename). - Remove
Buffer:isTemporary. - Remove
Buffer:getPointer(renamed toBuffer:mapData). - Remove
lovr.graphics.getPass(uselovr.graphics.newPass). - Remove
Pass:getType(passes support both render and compute now). - Remove
Pass:getTarget(renamed toPass:getCanvas). - Remove
Pass:getSampleCount(Pass:getCanvasreturns sample count). - Remove variant of
Pass:sendthat takes a binding number instead of a variable name. - Remove
Texture:newView(renamed tolovr.graphics.newTextureView). - Remove
Texture:isViewandTexture:getParent. - Remove
Shape:setPosition,Shape:setOrientation, andShape:setPose(useShape:setOffset). - Remove
Shape:is/setSensor(useCollider:is/setSensor). - Remove
World:overlaps/computeOverlaps/collide/getContacts(useWorld:setCallbacks). - Remove
BallJoint:setAnchor. - Remove
DistanceJoint:setAnchors. - Remove
HingeJoint:setAnchor. - Remove
BallJoint:get/setResponseTimeandBallJoint:get/setTightness. - Remove
DistanceJoint:get/setResponseTimeandDistanceJoint:get/setTightness(use:setSpring). - Remove
DistanceJoint:get/setDistance(renamed to:get/setLimits). - Remove
HingeJoint:get/setUpper/LowerLimit(use:get/setLimits). - Remove
SliderJoint:get/setUpper/LowerLimit(use:get/setLimits). - Remove
Collider:getLocalCenter(renamed toCollider:getCenterOfMass). - Remove
Shape:getMassData(split into separate getters). - Remove
shaderConstantSizelimit fromlovr.graphics.getLimits. - Remove
Pass:getViewportandPass:getScissor.