版本发布 4
Add --- ### General - Add `lovr.task` module and `lovr.taskready` callback. - Add support for compiling with Luau as the Lua implementation, instead of Lua/LuaJIT. - Add support for passing Luau `vector` and `quaternion` types to functions. - Add `vector` and `quaternion` modules. ### Audio - Add `AudioMesh` and `lovr.audio.newAudioMesh`. - Add support for ambisonic source playback. - Add `lovr.audio.setHRTF` to set a custom HRTF. - Add `Source:get/setAbsorption`. - Add `Source:get/setCone`. - Add `Source:get/setFalloff`. - Add `Source:get/setOcclusion`. - Add `Source:get/setReverb`. - Add `Source:get/setSpatialization`. - Add `lovr.audio.update` to atomically commit changes to audio sources. - Add `lovr.audio.getStream`. - Add `t.audio.debug` and `t.audio.reverb` settings to `lovr.conf`. ### Data - Add `AudioStream` and `lovr.data.newAudioStream`. - Add `Blob:setI8/setU8/setI16/setU16/setI32/setU32/setF32/setF64`. - Add `lovr.data.newBlobView`. - Add `Model(Data):getNodeChild/getNodeSibling`. - Add `Model(Data):getNodeMesh` (replaces `:getNodeMeshes`). - Add `ModelData:getMeshBlendShapeCount/getMeshBlendShapeName/getBlendVertex`. - Add `ModelData:getMeshPartCount`. - Add `ModelData:getMeshDrawRange`. - Add support for importing two sets of UVs in `ModelData`. - Add `Sound:get/setFrame`. ### Graphics - Add `Raytracer`, `lovr.graphics.newRaytracer`, and `raytracing` `GraphicsFeature`. - Add `raytracer` option to `lovr.graphics.newMesh` and `lovr.graphics.newModel`. - Add `Mesh:buildRaytracer` and `Model:buildRaytracer`. - Add `VertexUV2` builtin vertex attribute and `UV2` shader variable, for lightmapping. - Add `t.graphics.hdr` and `lovr.graphics.isHDR`. - Add `pqToLinear`, `linearToPQ`, `sRGBToRec2020`, and `rec2020ToSRGB` shader helpers. - Add `Pass:getViewRay`. - Add `Pass:setBlendState`. - Add `Pass:drawPart` to draw a single part of a `Model`. - Add `Model:meshes` to iterate over model nodes with meshes. - Add `Model:is/setNodeVisible`. - Add `lovr.graphics.getStats` for GPU memory allocation statistics. - Add support for creating 3D texture views. - Add `Mesh:get/setBaseVertex`. - Add support for custom array strides in buffer formats. - Add `bgra8` TextureFormat. - Add `Buffer:newBlob`. ### Headset - Add `lovr.modelschanged` event. - Add `lovr.headset.getModelKeys`. - Add support for "foveated quad" and "mono" display configurations. - Add `Layer:get/setOrigin` to lock Layer poses to a Device. - Add `dpup`, `dpdown`, `dpleft`, `dpright` DeviceButton. - Add `bumper` DeviceButton. - Add `body` `Device` for full-body tracking in `lovr.headset.getSkeleton`. - Add `lovr.simulate` callback to customize the headset simulator. - Add support for Touch Pro controllers. - Add `thumbrest` HeadsetAxis, for pressure-sensitive thumbrests. - Add `t.headset.extensions` to enable extra OpenXR extensions. - Add `lovr.headset.connect` and `t.headset.connect`. - Add `lovr.headset.setPosition/Orientation/Pose` and `lovr.headset.setButton`. ### Math - Add `Curve:getLength` and `Curve:step`. - Add `Mat4:setPosition/Orientation/Scale/Pose`. ### Physics - Add support for non-uniform scale in `ConvexShape` and `MeshShape`. ### System - Add `t.window.centered`. - Add `lovr.system.is/setWindowFullscreen`. - Add `lovr.system.get/setMouseMode`. ### Thread - Add `lovr.thread.call`. - Add `lovr.thread.getWorkerCount`. Change --- - Change model loading to use multiple threads to load images. - Change `Pass:setProjection` to accept a `ProjectionType`. - Change `lovr.graphics.newModel` to no longer retain its `ModelData`, allowing its memory to be freed. - Change functions to accept tables for vector/quaternion arguments instead of userdata vector types. - Change `require` to have better errors when files/plugins aren't found. - Change default require path to also search for `.luau` files, when using Luau. - Change `lovr.headset.newModel` to also take a lightuserdata. - Change `lovr.headset.newModel` to be async. - Change `lovr.headset.isTracked` to also take a `Model`. - Change `lovr.headset.getPosition/Orientation/Direction/Pose` to also take a `Model`. - Change `TerrainShape` to support `nil` heights (treated as holes). - Change `Curve:render` to no longer always return 2 points for curves with 2 control points. - Change `ModelData:getMeshVertex` to return data in a consistent vertex format. - Change `ModelData:getMeshDrawMode/getMeshMaterial` to take an optional part index. - Change `ModelData:getWidth/Height/Depth/Dimensions/BoundingBox` to take an optional mesh/part index. - Change `lovr.graphics.newBuffer` to also accept a Luau `vector` for the initial buffer data. - Change `Pass:transform` to also take a pose (7 numbers for the position and orientation). - Change `Mat4` to be a regular object instead of a vector type. - Change `lovr.graphics.submit` to have better performance when called multiple times per frame. - Change `Pass:text` and Font methods to also take nested tables of multicolor strings. - Change `lovr.audio.setDevice` sink parameter to be a `boolean` or an `AudioStream`. - Change `lovr.audio.start/stop` to return error messages on failure. - Change `lovr.audio.newSource` to create non-spatial sources by default. - Change `lovr.audio.newSource` to also accept an `AudioStream`. - Change audio device to start when playing a Source for the first time, instead of immediately. - Change `lovr.data.newSound` to take a channel count instead of a channel layout. - Change `lovr.data.newSound` and `lovr.audio.newSource` to be async. - Change `lovr.data.newImage` and `lovr.graphics.newTexture` to be async. - Change `lovr.data.newModelData` and `lovr.graphics.newModel` to be async. - Change `lovr.graphics.compileShader` and `lovr.graphics.newShader` to be async. - Change `Buffer:getData` and `Texture:getPixels` to be async. - Change `lovr.timer.sleep` to be async. - Change `Mesh:getVertices` and `Mesh:getIndices` to return `nil` for meshes with `gpu` storage. - Change `lovr.system.pollEvents` to take an optional timeout. Fix --- - Fix `ConvexShape` scale not working when created from a table of points. - Fix `ConvexShape:getPoint` to apply the shape's center of mass and scale. - Fix memory leak with `ConvexShape` and `MeshShape`. - Fix crash when creating invalid `ConvexShape`/`MeshShape`/`TerrainShape`. - Fix issue where OBJ models loaded without materials would have inverted UVs. - Fix issue where cube/array textures would only regenerate 1 mipmap. - Fix crash in `Pass:send` when using tables to write nested structs to a uniform buffer. - Fix crash when drawing text on a pass without a canvas. - Fix crash when using a 3D texture as a canvas texture. - Fix validation message when clearing a 3D texture. - Fix issue where normalized buffer fields were rounded incorrectly. - Fix possible crash related to `Thread:wait`. - Fix possible crash in Model animation. - Fix `Collider:setDegreesOfFreedom` to preserve mass/inertia. - Fix missing error in `CapsuleShape:setRadius/Length` and `CylinderShape:setRadius/Length`. - Fix issue where buffer memory wasn't recycled effectively. - Fix thread stack traces to use the correct filename. - Fix `t.headset.seated`. - Fix multiple issues with GPU memory allocation. - Fix `dt` to use delta time from `lovr.timer` when headset is idle. - Fix `lovr.filesystem.newFile` to search all mounted archives properly. - Fix `Texture:setPixels` when copying from an `Image` with an offset. - Fix issue with `Shape:containsPoint`. - Fix `Collider:moveKinematic` when called on a kinematic collider. - Fix fixed foveated rendering on Quest 3. - Fix `lovr.math.randomNormal` returning incorrect results after reseeding. Deprecate --- - Deprecate variant of `lovr.headset.newModel` that takes a `Device` (use a model key). - Deprecate `Model(Data):getNodeChildren` (use `:getNodeChild` and `:getNodeSibling`). - Deprecate base vertex argument in `Mesh:get/setDrawRange` (use `Mesh:get/setBaseVertex`). - Deprecate `Model:getVertexBuffer/getIndexBuffer/getMesh` (create your own from `ModelData`). - Deprecate `lovr.math.drain` (it does nothing now, since temporary vectors were removed). - Deprecate `lovr.math.vec2/vec3/vec4/quat/newVec2/newVec3/newVec4/newQuat` (use `vector` and `quaternion`). - Deprecate `lovr.math.mat4` (use `lovr.math.newMat4`). - Deprecate `t.math.globals` (use `vector` and `quaternion`). - Deprecate `Layer:getPass` (use your own `Pass`). - Deprecate ability to use zero for window dimensions in `lovr.conf` (use `t.window.fullscreen`). - Deprecate variant of `Pass:setProjection` that takes 4 numeric FOV angles (use `ProjectionType`). Remove --- - Remove `animated` flag in `lovr.headset.newModel` (all models are animated now). - Remove support for creating `ConvexShape` and `MeshShape` from a `Model` (use `ModelData`). - Remove support for passing a `Model` to `lovr.audio.setGeometry` (use `ModelData`). - Remove `ModelData:getBlobCount` and `ModelData:getBlob`. - Remove `ModelData:getNodeMeshes` (use `ModelData:getNodeMesh`). - Remove `ModelData:getMeshVertexFormat/getMeshIndexFormat`. - Remove `ModelData:getTriangleCount` (use `ModelData:getMeshVertexCount/getMeshIndexCount`). - Remove `ModelData:getTriangles` (use `ModelData:getMeshVertex/getMeshIndex`). - Remove `Model(Data):getBoundingSphere`. - Remove `Model:getVertexCount` (use `ModelData:getMeshVertexCount`). - Remove `Model:getData` (create and keep a `ModelData` around as needed). - Remove userdata vector types (use tables, and the `vector` and `quaternion` modules). - Remove `lovr.headset.getHandles` (use FFI). - Remove `lovr.audio.getSpatializer` (SteamAudio is always active). - Remove `lovr.audio.setGeometry` (use `AudioMesh`). - Remove `lovr.audio.get/setAbsorption` (use `Source:get/setAbsorption`). - Remove `Source:get/setDirectivity` (use `Source:get/setCone`). - Remove `Source:is/setEffectEnabled` (use new effect getters/setters). - Remove `Sound:getCapacity` and `Sound:isStream` (use `AudioStream`). - Remove `lovr.headset.getBoundsGeometry`. - Remove `Buffer:mapData`.
Add --- ### General - Add support for declaring objects as to-be-closed variables in Lua 5.4. ### Filesystem - Add `--watch` CLI flag, `lovr.filechanged` event, and `lovr.filesystem.watch/unwatch`. - Add `File` object and `lovr.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 `Font` and `Rasterizer`. - Add support for `uniform` variables 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 `sn10x3` `DataType`. - Add `border` `WrapMode`. - Add support for loading glTF models with 8 bit indices. - Add support for `d24` texture format. - Add support for `SampleID`, `SampleMaskIn`, `SampleMask`, and `SamplePosition` in pixel shaders. - Add support for `layout(scalar)` buffers and `packedBuffers` graphics feature. - Add `raw` flag to `lovr.graphics.newShader`. - Add `Texture:getLabel`, `Shader:getLabel`, and `Pass:getLabel`. - Add `Model:resetBlendShapes`. ### Headset - Add `Layer` object, `lovr.headset.newLayer`, and `lovr.headset.get/setLayers`. - Add `stylus` Device, `nib` DeviceButton, and `nib` DeviceAxis. - Add support for Logitech MX Ink input. - Add `lovr.headset.get/setFoveation`. - Add `t.headset.controllerskeleton` to control how controllers return hand tracking data. - Add `controller` field to the table returned by `lovr.headset.getSkeleton`. - Add `t.headset.mask`. - Add back `lovr.headset.isMounted` and the `lovr.mount` callback. - Add `lovr.headset.stop`, `lovr.headset.isActive`, and `t.headset.start`. - Add `lovr.headset.getFeatures`. - Add `t.headset.debug` to enable additional messages from the VR runtime. - Add `--simulator` CLI flag to force use of simulator headset driver. - Add `lovr.headset.getHandles`. ### Math - Add `Quat:get/setEuler`. ### Physics - Add variant of `lovr.physics.newWorld` that takes a table of settings. - Add `World:interpolate`. - Add `World:get/setCallbacks` and `Contact` object. - Add `World:getColliderCount`. - Add `World:getJointCount` and `World:getJoints`. - Add `World:shapecast`. - Add `World:overlapShape`. - Add `Collider:get/setGravityScale`. - Add `Collider:is/setContinuous`. - Add `Collider:get/setDegreesOfFreedom`. - Add `Collider:applyLinearImpulse` and `Collider:applyAngularImpulse`. - Add `Collider:moveKinematic`. - Add `Collider:getShape`. - Add `Collider:is/setSensor` (replaces `Shape: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:getForce` and `Joint:getTorque`. - Add `Joint:get/setPriority`. - Add `Joint:isDestroyed`. - Add `DistanceJoint:get/setLimits`. - Add `:get/setSpring` to `DistanceJoint`, `HingeJoint`, and `SliderJoint`. - Add `HingeJoint:get/setFriction` and `SliderJoint:get/setFriction`. - Add `SliderJoint:getAnchors`. - Add `Shape:raycast` and `Shape:containsPoint`. - Add `Shape:get/setDensity`. - Add `Shape:getMass/Volume/Inertia/CenterOfMass`. - Add `Shape:get/setOffset`. - Add motor support to `HingeJoint` and `SliderJoint`. - Add support for creating a `MeshShape` from a `ModelData`. ### System - Add `lovr.system.isWindowVisible` and `lovr.system.isWindowFocused`. - Add `lovr.system.wasMousePressed` and `lovr.system.wasMouseReleased`. - Add `lovr.system.get/setClipboardText`. - Add `lovr.system.openConsole` (for internal Lua code). - Add `KeyCode`s for numpad keys. ### Thread - Add table support to `Channel:push`. - Add `lovr.thread.newChannel`. - Add `t.thread.workers` to configure number of worker threads. Change --- - Change nogame screen to be bundled as a fused zip archive. - Change `Mesh:setMaterial` to also take a `Texture`. - Change shader syntax to no longer require set/binding numbers for buffer/texture variables. - Change `Texture:getFormat` to also return whether the texture is linear or sRGB. - Change `Texture:setPixels` to allow copying between textures with different formats. - Change `Readback:getImage` and `Texture:getPixels` to return sRGB images when the source Texture is sRGB. - Change `lovr.graphics.newTexture` to use a layer count of 6 when type is `cube` and only width/height is given. - Change `lovr.graphics.newTexture` to default mipmap count to 1 when an Image is given with a non-blittable format. - Change `lovr.graphics.newTexture` to error if mipmaps are requested and an Image is given with a non-blittable format. - Change `TextureFeature` to merge `sample` with `filter`, `render` with `blend`, and `blitsrc`/`blitdst` into `blit`. - Change headset simulator movement to slow down when holding the control key. - Change headset simulator to use `t.headset.supersample`. - Change `lovr.graphics.compileShader` to take/return multiple stages. - Change maximum number of physics tags from 16 to 31. - Change `TerrainShape` to require square dimensions. - Change `MeshShape` constructors to accept a `MeshShape` to reuse data from. - Change `MeshShape` constructors to take an optional scale to apply to the vertices. - Change `Buffer:setData` to use more consistent rules to read data from tables. - Change `World:queryBox/querySphere` to perform coarse AABB collision detection (use `World:overlapShape` for an exact test). - Change `World:queryBox/querySphere` to take an optional set of tags to include/exclude. - Change `World:queryBox/querySphere` to return the first collider detected, when the callback is nil. - Change `World:queryBox/querySphere` to return nil when a callback is given. - Change `World:raycast` to take a set of tags to allow/ignore. - Change `World:raycast` callback to be optional (if nil, the closest hit will be returned). - Change `World:raycast` to also return the triangle that was hit on MeshShapes. - Change physics queries to report colliders in addition to shapes. - Change `tostring` on objects to also include their pointers. - Change `desktop` HeadsetDriver to be named `simulator`. - Change `--graphics-debug` CLI flag to be named `--debug`. - Change `--version` and `lovr.getVersion` to also return the git commit hash. - Change `Pass:setViewport/Scissor` to be per-draw state instead of per-pass. - Change `Image:get/set/mapPixel` to support `r16f`, `rg16f`, and `rgba16f`. - Change `Image:getPixel` to return 1 for alpha when the format doesn't have an alpha component. - Change stack size of `state` stack (used with `Pass:push/pop`) from 4 to 8. - Change `lovr.focus` and `lovr.visible` to also get called for window events. - Change `lovr.focus` and `lovr.visible` to have an extra parameter for the display type. Fix --- - Fix `t.headset.submitdepth` to 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:getType` when used with texture views. - Fix possible negative `dt` in lovr.update when restarting with the simulator. - Fix issue where `Collider`/`Shape`/`Joint` userdata 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:slice` when curve has more than 4 points. - Fix bug with `hand/*/pinch` and `hand/*/poke` device poses. - Fix bug when loading glTF models that use the `KHR_texture_transform` extension. Deprecate --- - Deprecate `Texture:getSampleCount`. - Deprecate `World:get/setTightness` (use `stabilization` option when creating World). - Deprecate `World:get/setLinearDamping` (use `Collider:get/setLinearDamping`). - Deprecate `World:get/setAngularDamping` (use `Collider:get/setAngularDamping`). - Deprecate `World:is/setSleepingAllowed` (use `allowSleep` option when creating World). - Deprecate `World:get/setStepCount` (use `positionSteps`/`velocitySteps` option when creating World). - Deprecate `Collider:is/setGravityIgnored` (use `Collider:get/setGravityScale`). Remove --- - Remove `lovr.headset.getOriginType` (use `lovr.headset.isSeated`). - Remove `lovr.headset.getDisplayFrequency` (renamed to `lovr.headset.getRefreshRate`). - Remove `lovr.headset.getDisplayFrequencies` (renamed to `lovr.headset.getRefreshRates`). - Remove `lovr.headset.setDisplayFrequency` (renamed to `lovr.headset.setRefreshRate`). - Remove `lovr.graphics.getBuffer` (use `lovr.graphics.newBuffer`). - Remove variant of `lovr.graphics.newBuffer` that takes length first (format is first now). - Remove `location` key for Buffer fields (use `name`). - Remove `Buffer:isTemporary`. - Remove `Buffer:getPointer` (renamed to `Buffer:mapData`). - Remove `lovr.graphics.getPass` (use `lovr.graphics.newPass`). - Remove `Pass:getType` (passes support both render and compute now). - Remove `Pass:getTarget` (renamed to `Pass:getCanvas`). - Remove `Pass:getSampleCount` (`Pass:getCanvas` returns sample count). - Remove variant of `Pass:send` that takes a binding number instead of a variable name. - Remove `Texture:newView` (renamed to `lovr.graphics.newTextureView`). - Remove `Texture:isView` and `Texture:getParent`. - Remove `Shape:setPosition`, `Shape:setOrientation`, and `Shape:setPose` (use `Shape:setOffset`). - Remove `Shape:is/setSensor` (use `Collider:is/setSensor`). - Remove `World:overlaps/computeOverlaps/collide/getContacts` (use `World:setCallbacks`). - Remove `BallJoint:setAnchor`. - Remove `DistanceJoint:setAnchors`. - Remove `HingeJoint:setAnchor`. - Remove `BallJoint:get/setResponseTime` and `BallJoint:get/setTightness`. - Remove `DistanceJoint:get/setResponseTime` and `DistanceJoint: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 to `Collider:getCenterOfMass`). - Remove `Shape:getMassData` (split into separate getters). - Remove `shaderConstantSize` limit from `lovr.graphics.getLimits`. - Remove `Pass:getViewport` and `Pass:getScissor`.
Change --- - Change permissions for files and directories created by `lovr.filesystem` on POSIX (fixes ADB on Android 12+). - Change `Pass:sphere` to error when segment count is too small. - Change `Buffer:setData` to error when copying within a single Buffer with overlapping byte ranges. Fix --- - Fix LÖVR failing to start on Oculus Quest v62+. - Fix `Pass:skybox` to render cubemaps with the correct X/Z orientation. - Fix depth write when depth testing is disabled. - Fix `lovr.graphics.newModel` to support empty GLB models. - Fix `lovr.graphics.newModel` to support models without any vertices. - Fix bitangent sign in `TangentMatrix` builtin. - Fix shader #includes to error when including a file that doesn't exist. - Fix `lovr.quit` to not get called twice when canceling quit. - Fix GPU error when texture had only `transfer` usage. - Fix rare crash when calling vector methods. - Fix `Model:getMesh`.
Add --- ### General - Add `enet` plugin. - Add `http` plugin. - Add `utf8` module. - Add `:type` method to all objects and vectors. - Add `--graphics-debug` command line option, which sets `t.graphics.debug` to true. ### Audio - Add `lovr.audio.getDevice`. ### Data - Add `Image:mapPixel`. - Add a variant of `Blob:getString` that takes a byte range. - Add `Blob:getI8/getU8/getI16/getU16/getI32/getU32/getF32/getF64`. ### Filesystem - Add argument to `lovr.filesystem.load` to restrict chunks to text/binary. ### Graphics - Add `Pass:roundrect`. - Add variant of `Pass:cone` that takes two `vec3` endpoints. - Add variant of `Pass:draw` that takes a `Texture`. - Add `Pass:setViewCull` to enable frustum culling. - Add `Model:getBlendShapeWeight`, and `Model:setBlendShapeWeight`. - Add `Model(Data):getBlendShapeCount`, `Model(Data):getBlendShapeName`. - Add support for animated blend shape weights in Model animations. - Add support for arrays, nested structs, and field names to Buffer formats. - Add `Shader:getBufferFormat`. - Add back `Mesh` object (sorry!). - Add `Model:clone`. - Add `materials` flag to `lovr.graphics.newModel`. - Add `lovr.graphics.isInitialized` (mostly internal). - Add support for using depth textures in multisampled render passes. - Add `depthResolve` feature to `lovr.graphics.getFeatures`. - Add a variant of `Texture:newView` that creates a 2D slice of a layer/mipmap of a texture. - Add a variant of `Pass:send` that takes tables for uniform buffers. - Add `Buffer:getData` and `Buffer:newReadback`. - Add `Texture:getPixels/setPixels/clear/newReadback/generateMipmaps`. - Add support for stepping through shaders in e.g. RenderDoc when `t.graphics.debug` is set. - Add `lovr.graphics.is/setTimingEnabled` to record GPU durations for each Pass object. - Add `lovr.graphics.newPass`. - Add `Pass:setCanvas` and `Pass:setClear`. - Add `Pass:getStats`. - Add `Pass:reset`. - Add `Pass:getScissor` and `Pass:getViewport`. - Add `Pass:barrier`. - Add `Pass:beginTally/finishTally` and `Pass:get/setTallyBuffer`. - Add support for `#include` in shader code. ### Headset - Add `lovr.headset.getPassthrough/setPassthrough/getPassthroughModes`. - Add support for more headsets in Android APKs (Quest, Pico, Vive Focus all work). - Add support for controller input on Pico Neo 3 and Pico Neo 4 devices. - Add support for controller input on Magic Leap 2. - Add `hand/*/pinch`, `hand/*/poke`, and `hand/*/grip` Devices. - Add support for using `lovr.headset` when `lovr.graphics` is disabled, on supported runtimes. - Add support for `elbow/left` and `elbow/right` poses on Ultraleap hand tracking. - Add `lovr.headset.getDirection`. - Add `lovr.headset.isVisible` and `lovr.visible` callback. - Add `lovr.recenter` callback. - Add `floor` Device. - Add `t.headset.seated` and `lovr.headset.isSeated`. - Add `lovr.headset.stopVibration`. - Add `radius` fields to joint tables returned by `lovr.headset.getSkeleton`. - Add support for "sprinting" in the headset simulator using the shift key. ### Math - Add capitalized globals for creating permanent vectors (`Vec2`, `Vec3`, `Vec4`, `Quat`, `Mat4`). - Add `Vec3:transform`, `Vec4:transform`, and `Vec3:rotate`. - Add vector constants (`vec3.up`, `vec2.one`, `quat.identity`, etc.). - Add `Mat4:getTranslation/getRotation/getScale/getPose`. - Add variant of `Vec3:set` that takes a `Quat`. - Add `Mat4:reflect`. ### Physics - Add `TerrainShape`. - Add `World:queryBox` and `World:querySphere`. - Add `World:getTags`. - Add `Shape:get/setPose`. - Add missing `lovr.physics.newMeshShape` function. - Add `Collider:isDestroyed`. ### System - Add `lovr.system.wasKeyPressed/wasKeyReleased`. - Add `lovr.system.getMouseX`, `lovr.system.getMouseY`, and `lovr.system.getMousePosition`. - Add `lovr.system.isMouseDown`. - Add `lovr.mousepressed`, `lovr.mousereleased`, `lovr.mousemoved`, and `lovr.wheelmoved` callbacks. - Add `lovr.system.has/setKeyRepeat`. ### Thread - Add support for vectors and lightuserdata with `Channel:push` and `Channel:pop`. Change --- - Change `lovr.graphics.submit` to no longer invalidate Pass objects. - Change vector constructors to be callable metatables (allows adding custom methods). - Change max size of vector pool to hold 16 million numbers instead of 64 thousand. - Change `Pass:setBlendMode`/`Pass:setColorWrite` to take an optional attachment index. - Change OpenXR driver to throttle update loop when headset session is idle. - Change `lovr.graphics.newModel` to work when the asset references paths starting with `./`. - Change `lovr.graphics.newModel` to error when the asset references paths starting with `/`. - Change `lovr.graphics.newBuffer` to take format first instead of length/data. - Change `Pass:setStencilWrite` to only set the "stencil pass" action when given a single action, instead of all 3. - Change `lovr.graphics` to show a message box on Windows when Vulkan isn't supported. - Change plugin loader to call `JNI_OnLoad` on Android so plugins can use JNI. - Change `t.headset.overlay` to also support numeric values to control overlay sort order. - Change `World:isCollisionEnabledBetween` to take `nil`s, which act as wildcard tags. - Change `Mat4:__tostring` to print matrix components. - Change `World:raycast` to prevent subsequent checks when the callback returns `false`. - Change `lovr.system.isKeyDown` to take multiple keys. - Change `lovr.headset.isDown/isTouched` to return nil instead of nothing. - Change `lovr.headset.getTime` to always start at 0 to avoid precision issues. - Change Pass viewport and scissor to apply to all draws in the Pass, instead of per-draw. - Change nogame/error screen to use a transparent background on AR/passthrough headsets. - Change VR simulator to use projected mouse position for hand pose (scroll controls distance). - Change `lovr.headset.getDriver` to also return the OpenXR runtime name. - Change `pitchable` flag in `lovr.audio.newSource` to default to true. - Change `Buffer:setData`, `Buffer:clear`, and `Buffer:getPointer` to work on permanent Buffers. - Change `lovr.timer.sleep` to have higher precision on Windows. - Change `lovr.headset.animate` to no longer require a `Device` argument (current variant is deprecated). Fix --- - Fix `lovr.physics.newBoxShape` always creating a cube. - Fix several issues related to VRAM leaks when creating Textures. - Fix issue on Linux where the Vulkan library wouldn't get loaded properly. - Fix macOS to not require the Vulkan SDK to be installed. - Fix recentering on Quest. - Fix headset mirror window to properly render in mono when a VR headset is connected. - Fix window size not updating on resize or on highdpi displays. - Fix `MeshShape` not working properly with some OBJ models. - Fix `Model:getNodeScale` to properly return the scale instead of the rotation. - Fix `Mat4:set` and `Mat4` constructors to properly use TRS order when scale is given. - Fix `lovr.graphics.newShader` to work with `nil` shader code (uses `unlit` shader). - Fix crash when `t.graphics.debug` is set but the validation layers aren't installed. - Fix a few memory leaks with Readbacks, Fonts, and compute Shaders. - Fix `Pass:setProjection` to use an infinite far plane by default. - Fix `Texture:hasUsage`. - Fix `Pass:points` / `Pass:line` to work with temporary vectors. - Fix `lovr.event.quit` to properly exit on Android/Quest. - Fix mounted zip paths sometimes not working with `lovr.filesystem.getDirectoryItems`. - Fix issue where temporary vectors didn't work in functions that accept colors. - Fix crash when rendering multiple identical torus shapes in the same Pass. - Fix `lovr.graphics.newShader` to error properly if the push constants block is too big. - Fix default `lovr.log` to not print second `string.gsub` result. - Fix issue where `lovr.data.newImage` wouldn't initialize empty `Image` object pixels to zero. - Fix `Model:getMaterial` to work when given a string. - Fix issue where `Vec3:angle` would sometimes return NaNs. - Fix OpenXR driver when used with AR headsets. - Fix vertex tangents (previously they only worked if the `normalMap` shader flag was set). - Fix error when minimizing the desktop window on Windows. - Fix `DistanceJoint:getAnchors`. - Fix issue where `Material:getProperties` returned an incorrect uvScale. - Fix crash when uvShift/uvScale were given as tables in `lovr.graphics.newMaterial`. - Fix retina macOS windows. - Fix issue where `Pass:capsule` didn't render anything when its length was zero. - Fix confusing console message when OpenXR is not installed. - Fix issue where OBJ UVs were upside down. - Fix issue where equirectangular skyboxes used an incorrect z direction. - Fix seam when rendering equirectangular skyboxes with mipmaps. - Fix font wrap when camera uses a projection matrix with a flipped up direction. - Fix Model import when vertex colors are stored as vec3. - Fix 24-bit WAV import. - Fix issue with 3-letter vec3 swizzles. - Fix error when subtracting a vector from a number. - Fix error when adding a number and a temporary vector (in that order). - Fix issue where `t.window = nil` wasn't working as intended. - Fix bug where some fonts would render glyphs inside out. Deprecate --- - Deprecate `lovr.graphics.getPass` (`lovr.graphics.newPass` should be used instead). - Deprecate `Pass:getType`. All Pass objects support both compute and rendering (computes run before draws). - Deprecate `Pass:getTarget` (renamed to `Pass:getCanvas`). - Deprecate `Pass:getSampleCount` (`Pass:getCanvas` returns a `samples` key). - Deprecate `lovr.graphics.getBuffer` (Use `lovr.graphics.newBuffer` or tables). - Deprecate variant of `lovr.graphics.newBuffer` that takes length/data as the first argument (put format first). - Deprecate `lovr.headset.get/setDisplayFrequency` (it's named `lovr.headset.get/setRefreshRate` now). - Deprecate `lovr.headset.getDisplayFrequencies` (it's named `lovr.headset.getRefreshRates` now). - Deprecate `lovr.headset.getOriginType` (use `lovr.headset.isSeated`). - Deprecate variant of `lovr.headset.animate` that takes a `Device` argument (just pass the `Model` now). - Deprecate `Buffer:getPointer` (renamed to `Buffer:mapData`). Remove --- - Remove `transfer` passes (methods on `Buffer` and `Texture` objects can be used instead). - Remove `Pass:copy` (use `Buffer:setData` and `Texture:setPixels`). - Remove `Pass:read` (use `Buffer:newReadback` and `Texture:newReadback`). - Remove `Pass:clear` (use `Buffer:clear` and `Texture:clear`). - Remove `Pass:blit` (use `Texture:setPixels`). - Remove `Pass:mipmap` (use `Texture:generateMipmaps`). - Remove `Tally` (use `lovr.graphics.setTimingEnabled` or `Pass:beginTally/finishTally`). - Remove `lovr.event.pump` (it's named `lovr.system.pollEvents` now). - Remove `t.headset.offset` (use `t.headset.seated`). - Remove `mipmaps` flag from render passes (they always regenerate mipmaps now).