bjorn
6c45c4df3c
isDown/isTouched return nil instead of nothing;
2023-04-28 20:34:47 -07:00
bjorn
6862b8c970
Change cofactor/normal matrix to mat3;
...
This means per-draw uniform data is 128 bytes now!
2023-04-27 20:22:31 -07:00
bjorn
e9d61bd254
Fix error typo;
2023-04-27 20:17:30 -07:00
bjorn
b402745f6c
Update comment;
2023-04-27 19:52:24 -07:00
bjorn
b64fdc937f
Move mapped buffers from core/gpu into graphics module;
2023-04-27 19:48:12 -07:00
bjorn
4563959ed1
Rename scratch buffers to temp buffers internally;
2023-04-27 19:15:56 -07:00
bjorn
8f654ed408
Simplify fill shaders;
...
Now there's 2 instead of 3! Behavior is the same, fill goes
layer-by-layer onto each view until either the texture or canvas run out
of layers.
2023-04-26 22:18:06 -07:00
bjorn
ad20289595
Make default compute shaders regular default shaders;
...
Minor cleanup;
2023-04-26 21:36:30 -07:00
bjorn
f174755fc4
Fix accidental vec3->vec4 change;
...
Oops! Too many ctrl-a's!
2023-04-26 17:31:02 -07:00
bjorn
4b8ada2690
Fix Pass:plane z scale / normal matrix;
...
Pass:plane was leaving its z scale uninitialized, which resulted in
a garbage normal matrix and other issues when using the transform in a
shader. Planes were the only shape affected by this.
2023-04-26 17:27:00 -07:00
bjorn
cb44549205
Fix more prototypes;
2023-04-25 21:45:30 -07:00
bjorn
ad4978f692
Fix prototypes;
2023-04-25 21:37:14 -07:00
bjorn
6a030ef4f2
Add shader debug info when t.graphics.debug is set;
2023-04-19 20:49:34 -07:00
bjorn
56851fd0f2
Make builtin layouts constant instead of variable;
2023-04-14 21:27:47 -07:00
bjorn
70e5a69576
Cleanup;
2023-04-14 21:25:48 -07:00
bjorn
4bfab067ae
Make shader input/output locations optional;
2023-04-14 21:21:14 -07:00
bjorn
ba0412182b
gpu: nickname shaders;
2023-04-05 21:53:39 -07:00
bjorn
024ea094a4
Fix Pass:roundrect bug;
...
It would draw a plane when radius was zero, even if it was supposed to
be thick.
2023-04-04 17:40:24 -07:00
bjorn
34c3e2c309
Fix Mesh validation and issues with untyped buffers;
2023-04-02 15:09:37 -07:00
bjorn
f3448d3167
Improve error when buffer fields are missing;
2023-04-02 13:00:32 -07:00
bjorn
4f1e3a17e1
Improve error message for invalid first buffer arg;
2023-04-02 12:58:39 -07:00
bjorn
36e8ded0d8
Add helper function for getBuffer/newBuffer;
2023-04-02 12:54:19 -07:00
bjorn
01ba9927c1
Fix flipped condition when writing buffer data;
2023-04-02 10:09:06 -07:00
bjorn
9c054c0515
Add mouse input to lovr.system;
2023-04-01 13:08:47 -07:00
bjorn
94879c1529
Rebase fixes;
2023-03-31 18:45:40 -07:00
bjorn
26b52f83eb
ModelData:getAnimationKeyframe works with blend weight animations;
2023-03-31 18:45:16 -07:00
bjorn
07a6d11c46
Split vertex animation into multiple dispatches as needed;
...
If the number of skinned vertices in a Model doesn't fit in a single
dispatch (~2M vertices on 32-sized subgroups or ~500K vertices on
8-sized subgroups), split it into multiple dispatches.
2023-03-31 18:45:16 -07:00
bjorn
ff10461e69
Reduce blend shape chunk size from 128 to 64;
2023-03-31 18:45:16 -07:00
bjorn
f56b48b3a7
Blend shapes and skinning work at the same time;
2023-03-31 18:45:16 -07:00
bjorn
4a6de6caf5
Write blend shape compute shader; Bugfixes;
2023-03-31 18:45:16 -07:00
bjorn
530db8c7f8
WIP blend shape compute dispatch;
2023-03-31 18:45:16 -07:00
bjorn
086aef1a79
Convert pipeline type bool into enum;
...
It's a little more readable.
Also batch compute passes for models with multiple skins, since they can
all run at the same time.
2023-03-31 18:44:31 -07:00
bjorn
ce645c0285
Shader stores compute pipeline as pointer;
2023-03-31 18:44:31 -07:00
bjorn
764a88d70b
Model(Data):getBlendShapeCount/Name;
2023-03-31 18:44:31 -07:00
bjorn
3b1414deac
Ok redesign blend shapes but they're good now;
2023-03-31 18:44:29 -07:00
bjorn
b118ac1938
Terrible blend shape Lua API;
2023-03-31 18:43:16 -07:00
bjorn
e1908f4a49
Blend shape weight accessors;
2023-03-31 18:42:48 -07:00
bjorn
f8f3a78d11
Model:animate can animate blend shape weights;
2023-03-31 18:42:48 -07:00
bjorn
b1b78319b5
Model loads blend shape data and weights;
2023-03-31 18:42:45 -07:00
bjorn
21bb3eb096
ModelData parses blend shapes;
2023-03-31 18:39:39 -07:00
bjorn
9722800d67
Fix blend mode merge;
2023-03-30 19:51:59 -07:00
bjorn
6bca4663ee
Merge branch 'master' into dev
2023-03-30 19:51:38 -07:00
bjorn
7b6618310a
Fix blend mode merge;
2023-03-30 19:51:17 -07:00
bjorn
e9c79417c7
Merge branch 'master' into dev
2023-03-30 19:40:39 -07:00
bjorn
7f5ab081f5
Use runtime preferred environment blend mode;
2023-03-30 19:39:50 -07:00
Josip Miskovic
e7be0f900e
Fix acos domain error in angle between two Vec3
2023-03-23 23:37:11 +01:00
Bjorn
2d8db03faa
Merge pull request #642 from bjornbytes/buffer-improvements
...
Buffer Format Improvements
2023-03-21 23:07:20 -07:00
bjorn
bfbd17fc9f
Zero-initialize spv_field memory;
...
Not all fields are guaranteed to get filled in.
2023-03-21 22:26:14 -07:00
bjorn
aecfe544b6
core/spv: Support runtime arrays in struct fields;
...
These have their array length set to ~0u.
2023-03-21 22:25:48 -07:00
bjorn
f32800c044
Clean up Model lookeruppers; Model:getMaterial takes string;
2023-03-21 21:30:11 -07:00
bjorn
4d5e3f03b9
Change the way a single stencil action is used;
...
When a single stencil action is provided in Pass:setStencilWrite, it now
maps to just passOp instead of all the ops. This matches expectations
and previous versions.
2023-03-21 21:13:38 -07:00
bjorn
aa2f620c89
Fix issue where changing shaders doesn't reset vertex format;
2023-03-20 13:54:38 -07:00
bjorn
fa0576e42c
Fix some magic numbers;
2023-03-20 13:54:38 -07:00
bjorn
8b30dc73d3
Fix backwards compatibility behavior;
...
Fixes (data, format) order when fields are given using integer keys
instead of string keys.
2023-03-20 13:54:38 -07:00
bjorn
8fa46fe236
Reading arrays of vectors works with temp vectors;
2023-03-20 13:54:38 -07:00
bjorn
92e9efd882
More flexible Buffer formats; Deprecate temp buffers;
...
- Pass:mesh accepts tables for vertices/indices
- Add Pass:setVertexFormat to set format used for table-based meshes
- Pass:send accepts tables for buffers
- Pass:send supports arbitrarily nested structs/arrays for push constants
- Buffer formats support arbitrarily nested structs/arrays
- Zero-length buffers are valid and represent structs
- Fields can have names using 'name'
- Field types can be tables of other fields (structs)
- Fields can have 'length' key
- newBuffer syntax has been changed to put format first (old version
still works)
- Buffers can be created from shader variables, avoiding need to declare
matching format.
- Pass:clear/Pass:read use byte offsets instead of indices
- Pass:copy uses byte offsets when copying a Buffer to a Buffer
- Deprecate lovr.graphics.getBuffer (tables can be used instead)
2023-03-20 13:54:37 -07:00
bjorn
d2b2523306
Improve sampler2D error message;
...
- core/spv just returns the type of image variables instead of trying to
validate them.
- When Shader is loading resources, it will reject combined image
samplers, uniform/texel buffers, and input attachments, with better
error messages that include the binding number of the invalid resource.
2023-03-20 13:15:47 -07:00
bjorn
ffd6396aae
Error when model uses absolute path; Ignore ./ in model paths;
...
Fixes #652
2023-03-13 21:14:47 -07:00
bjorn
a2da95031b
Merge branch 'master' into dev
2023-03-13 20:49:33 -07:00
bjorn
1d1470f042
Fix directory archive path normalization;
...
Fixes non-normalized paths not behaving as expected.
2023-03-09 21:27:04 -08:00
bjorn
fe524452f3
Merge branch 'master' into dev
2023-03-09 18:37:25 -08:00
bjorn
b33cc99374
Fix potential crash when creating textures;
...
beginFrame needs to be called a little bit earlier (before getting the
buffer to write the texture contents).
2023-03-09 18:36:23 -08:00
bjorn
2ad2fd6d90
OpenXR: Improve error messages;
...
- Error messages say what went wrong instead of file/line
- Instead of silently failing during startup, log a warning
2023-03-07 20:16:59 -08:00
mcc
c3b63e60ba
Create LOVR_NORETURN abstracting the contradictory noreturn implementations in C11 and C++11
2023-03-05 19:16:59 -05:00
Bjorn
d8e856e6e0
Merge pull request #645 from mcclure/size-t-narrow
...
Address various MSVC warnings (casts, comparisons, function pointers)
2023-03-03 17:25:48 -08:00
Bjorn
5fa53b3812
Update error message;
2023-03-03 17:17:49 -08:00
mcc
e4e8c5476b
Warning fixes (fix style)
2023-03-03 15:48:41 -05:00
bjorn
aba5f328fe
Throttle when OpenXR session is idle;
2023-03-02 19:33:35 -08:00
bjorn
ccffd3c1b2
Merge branch 'master' into dev
2023-03-02 18:31:20 -08:00
bjorn
6d382c2f0c
Ensure blank images are cleared to zero;
...
This was an unintended change in v0.16.0.
2023-03-02 18:31:06 -08:00
mcc
52a7a51b8e
Silence spurious function-pointer mismatch warning
2023-03-01 19:14:22 -05:00
mcc
d00d908520
Silence signed/unsigned warning on rounded rectangle loop
2023-03-01 19:13:15 -05:00
mcc
a5216347a0
Address size_t narrowing warnings in MSVC by adding casts. Add some asserts to make sure the casts are safe.
2023-03-01 18:15:04 -05:00
bjorn
4afb0ae2bf
Fix Pass:clear(buffer);
2023-02-25 00:01:31 -08:00
bjorn
886db5f91d
Stop using isdigit in obj importer;
2023-02-25 00:00:04 -08:00
bjorn
abbc6a6dc6
Merge branch 'master' into dev
2023-02-21 21:12:33 -08:00
bjorn
af4f1c1dea
Fix compilation with glslang disabled;
2023-02-07 22:48:50 -08:00
bjorn
41dd24edc4
Organize math module files;
2023-02-07 21:44:43 -08:00
Bjorn
d1eaa43997
Merge pull request #641 from brainrom/pkgrename
...
Android package rename via CMake
2023-02-05 21:57:25 -08:00
Bjorn
49489dc0e8
Apply suggestions from code review
2023-02-05 21:47:52 -08:00
bjorn
89edccbf4c
Add lovr.headset.isPassthroughEnabled and lovr.headset.setPassthroughEnabled;
2023-02-05 19:51:12 -08:00
bjorn
e4eb336bd6
Prevent creation of unrenderable texture views;
...
There were certain cases where an unrenderable texture view could be
created from a renderable parent texture (e.g. it has multiple mipmap
levels). This would leave renderView as NULL, which would cause a
crash.
2023-02-05 17:34:24 -08:00
bjorn
e076a582ce
3D depth textures can not have the 'render' flag;
...
Vulkan said so!!
2023-02-05 17:18:45 -08:00
bjorn
a160def4e3
rm unreachable mipmap assert;
...
It's clamped earlier.
2023-02-05 17:15:15 -08:00
bjorn
b76d9bbfe5
Ensure mipmap count is consistently 1 for render targets;
...
Currently if you create a texture from dimensions (assumed to be a
render target), its mipmap count differs depending on whether you
provide an options table. Now it will consistently be 1.
2023-02-05 16:02:58 -08:00
bjorn
495fca5f23
Add a variant of Texture:newView for single slices/mipmaps;
...
This is a more convenient syntax for the common case of creating a 2D
view of a single slice/level of an array/cubemap/3D texture.
2023-02-05 15:15:11 -08:00
bjorn
06c150ce4e
Pass:setBlendMode/Pass:setColorWrite take optional target index;
...
If the target index is missing, the state will apply to all targets.
Fixes undefined behavior when setting color state in a pass with
multiple color attachments.
2023-02-05 15:07:33 -08:00
bjorn
b0c3bd6e4c
Lightuserdata can be pushed to channels;
2023-02-04 14:08:22 -08:00
bjorn
8337dd9caf
Vectors work with channels;
...
They are copied by value. Upon popping, they are pushed as temporary
vectors. Matrices are allocated on the heap, everything else is stored
in the Variant itself.
2023-02-04 14:03:12 -08:00
bjorn
2144b5f81d
Backport Lua utf8 library;
2023-02-03 23:17:43 -08:00
bjorn
fbc591802a
Details;
2023-02-01 19:26:18 -08:00
bjorn
66cb43a665
Support elbow poses from hand tracking;
...
Via XR_ULTRALEAP_hand_tracking_forearm
2023-02-01 18:36:05 -08:00
bjorn
bf98c066b4
t.math.globals also adds capitalized constructors;
2023-02-01 17:57:37 -08:00
bjorn
b8b40bac40
Update stb_image to 2.28;
2023-01-31 18:20:26 -08:00
bjorn
bf31072d0d
Cleanup;
2023-01-30 19:44:23 -08:00
Ilya Chelyadin
d84d358de7
Minor fixes
2023-01-31 06:03:53 +03:00
kokokoshka
85b6e36020
Android package rename via CMake
2023-01-30 20:35:49 +03:00
Ilya Chelyadin
f0265a6f48
Disable headless OpenXR extension for Android
2023-01-29 23:45:23 +03:00
Ilya
933ae3a9ba
Merge branch 'bjornbytes:master' into picofix
2023-01-29 23:33:48 +03:00
bjorn
d973020ce4
Add UVs to roundrect;
2023-01-27 00:32:21 -08:00
bjorn
2bccc4bf08
Increase max size of vector pool;
...
16k vec3s -> 4 million vec3s
2023-01-26 21:44:01 -08:00
bjorn
132b8d6003
Pass:roundrect;
2023-01-26 21:24:37 -08:00
bjorn
d08cc539e8
Add vector constants;
...
They are implemented in the __index metamethod and return temporaries.
2023-01-24 18:37:04 -08:00
bjorn
017c2136fd
Merge branch 'master' into dev
2023-01-24 18:36:27 -08:00
bjorn
4b0931a814
Change temp vector constructors to metatable __calls;
...
This enables a few things:
- Custom vector methods can be added/replaced.
- Vector methods can be called as non-methods e.g. vec3.normalize(v)
- Possibility for vector constants in an __index metamethod.
This was measured as increasing overhead by 3.5% when creating temporary
vectors (2ns), which is arbitrarily deemed acceptable.
2023-01-24 18:01:31 -08:00
bjorn
4e01f84070
Depth resolves;
...
- Allow multisampled render pass to have a single-sample depth attachment
- Add a new depthResolve feature, indicating whether it's supported
- Fix stencil load/save
- Minor changes to render pass caching
- Currently the depth resolve is done using the first sample. A future
improvement would be to expose/use the min/max/average resolve modes.
2023-01-22 23:30:57 -08:00
bjorn
b24350fb31
gpu: macOS also tries linking to MoltenVK;
2023-01-21 15:27:14 -08:00
bjorn
bee8d16427
Add error when render pass/texture sample counts don't match;
2023-01-21 12:16:35 -08:00
bjorn
5bb3f50d77
gpu: enable VK_EXT_swapchain_colorspace when available;
2023-01-20 22:02:32 -08:00
bjorn
ffa4beb21c
Fix thread refcounting;
...
Minor race condition between thread starting and thread getting released.
2023-01-19 15:05:04 -08:00
bjorn
4675dfb3e9
Fix build;
2023-01-18 18:21:53 -08:00
bjorn
14610333ab
gpu: reduce tick count to 2;
...
4 is likely excessive, especially for VR, and increases memory usage and
cache misses.
2023-01-18 17:58:28 -08:00
bjorn
32cc6d52e7
gpu: cleanup;
...
- Surface stuff in struct;
- Struct for extensions;
2023-01-18 17:57:03 -08:00
bjorn
ad76d2c0c6
gpu: Require and use VK_KHR_create_renderpass2;
...
It's pretty much ubiquitous and is needed for depth resolves.
2023-01-16 16:25:39 -08:00
bjorn
3e0d2a1ecf
core/os: window size is always in framebuffer units;
...
pixel density is exposed as a separate accessor.
2023-01-10 19:54:48 -08:00
undef
bc7a541279
Fix constrained rendering in windowed mode on macOS #620
2023-01-06 20:30:05 +01:00
Ilya
f3837d99fd
Merge branch 'bjornbytes:master' into picofix
2023-01-04 23:03:54 +03:00
bjorn
b6d8546a6f
Merge branch 'master' into dev
2023-01-02 16:46:55 -08:00
bjorn
dd65a59602
Fix some literals in Curve:evaluate;
2023-01-02 14:43:27 -08:00
bjorn
58c5f0624e
Fix for vk portability extension;
...
- Always enable when supported.
- It's not required to be enabled, even if portability_enumeration is present.
2023-01-01 05:03:05 -08:00
bjorn
ae4a75eecd
Shift around Vulkan initialization;
...
Start to make it easier to declare extensions, mark them as required,
and detect whether they're supported at runtime.
2022-12-31 17:42:51 -08:00
Bjorn
119935fdd9
Merge pull request #627 from jmiskovic/add/gettags
...
A getter for World list of tags
2022-12-29 19:14:49 -08:00
bjorn
b885f2abf5
rm AUTO_MAP_LOCATIONS flag from glslang options;
...
It doesn't work properly, and silently produces broken shaders when the location is left off.
2022-12-26 07:21:54 -08:00
Josip Miskovic
9e06c72b37
A getter for World list of tags
2022-12-26 09:50:14 +01:00
bjorn
305213bfb4
Error if shader push constants are too big;
2022-12-25 17:18:05 -08:00
Josip Miskovic
bc1308c463
Check if torus shape is cached
2022-12-22 17:26:21 +01:00
bjorn
886e3bb42f
Fix some windows warnings;
2022-12-19 14:01:30 -08:00
bjorn
e12563ad25
Merge branch 'master' into dev
2022-12-16 21:21:05 -08:00
Ilya
2adbd80997
Merge branch 'bjornbytes:master' into picofix
2022-12-11 13:15:48 +03:00
bjorn
0cacddb2f8
Fix Android quitting again;
...
See comment for details.
2022-12-11 02:11:11 -08:00
bjorn
a79b3af7e5
Fix issue where temp vectors sometimes don't work as colors;
2022-12-11 00:41:12 -08:00
Ilya
5b36c44cfc
Merge branch 'bjornbytes:master' into picofix
2022-12-11 11:19:06 +03:00
bjorn
58cc96414a
Add flag to omit GLFW from build;
2022-12-10 20:29:36 -08:00
bjorn
f013831b73
Reorganize thread code;
...
- Put channel into thread module file.
- Make thread internals private.
- Handle more thread bookkeeping in thread module instead of Lua API.
- Fix a few race conditions/leaks nobody was probably ever going to hit.
2022-12-10 20:13:39 -08:00
bjorn
06dad182db
Fix mounted directories with non-empty mountpoints;
...
Mounting directories with mountpoints wasn't treating the components
in the mountpoint path as virtual directories.
2022-12-10 18:25:09 -08:00
bjorn
74a9b90e93
Fix zip archive enumeration;
...
Zip archives weren't enumerating in the root directory when they were
mounted with a non-empty mountpoint. Additionally, zips mounted at the
root directory weren't listing files properly. This fixes both by
normalizing the mountpoint prefix (it had a prepended slash when it was
empty, which messed up hashing), and ensuring there is a "root node" in
the tree with an empty string.
2022-12-10 18:25:09 -08:00
Bjorn
3fb9445149
Merge pull request #613 from brainrom/patch-1
...
Check for thread handle
2022-12-10 13:53:57 -08:00
bjorn
5edbfdbffb
Pass:cone supports 2-endpoint variant;
2022-12-10 13:51:16 -08:00
Ilya
10675761e2
Check for thread handle
2022-12-11 00:47:20 +03:00
bjorn
e63d142009
Fix refcounting when creating Font from Rasterizer;
2022-12-10 13:35:03 -08:00
bjorn
36070e828c
Add missing validation for rendering to depth textures;
2022-12-10 11:20:56 -08:00
bjorn
71df5176ad
Fix lovr.event.quit on Android;
2022-12-10 00:12:55 -08:00
Ilya Chelyadin
48aad15b1f
Fix comma
2022-12-08 07:12:59 +03:00
Ilya Chelyadin
f62c99e469
Fix typos, indentation, minor issues
2022-12-08 07:05:30 +03:00
Ilya
bd767092f3
Merge branch 'bjornbytes:master' into picofix
2022-12-07 19:50:13 +03:00
bjorn
bd3ba49fef
webgpu: start stream;
2022-12-04 22:58:03 -08:00
bjorn
b5c14da4a6
Pass:line errors if only 1 point is provided;
2022-12-04 18:01:20 -08:00
bjorn
bb46fa5745
Pass:line copies tables of vectors to vertices better;
...
Using vec3_init writes 4 floats which can, extremely rarely, go past the
end of the vertex buffer.
2022-12-04 18:00:24 -08:00
bjorn
7bd3546aa9
Fix Pass:line ignoring temporary vectors in tables;
2022-12-04 17:58:49 -08:00
bjorn
98b5fcfd20
Improve Vulkan error messages;
...
Instead of printing the raw Vulkan error printed, a friendly error
message gets printed out with the Vulkan error in parentheses.
2022-12-04 01:58:53 -08:00
bjorn
6678af02a2
rm some unnecessary GLFW window hints;
2022-12-03 23:29:49 -08:00
Bjorn
78a70670bb
Merge branch 'dev' into MSFT_controller_model
2022-12-03 19:34:49 -08:00
bjorn
2a0780718c
webgpu: pipeline;
2022-12-03 16:12:41 -08:00
bjorn
67235a5777
webgpu: shader;
...
WGSL? Never heard of it
2022-12-03 15:22:23 -08:00
bjorn
ae088a0807
webgpu: layout;
...
Barely
2022-12-03 15:03:27 -08:00
bjorn
3553982bad
gpu: rm GPU_STAGE_ALL;
...
It wasn't very useful and probably doesn't do what was intended.
2022-12-03 15:02:55 -08:00
bjorn
9b02f8cace
webgpu -> wgpu;
2022-12-03 14:15:28 -08:00
bjorn
1d6931291c
webgpu: texture views;
2022-12-03 14:12:02 -08:00
bjorn
ed3306f95d
webgpu: buffer;
...
Oh the innocence
2022-12-03 14:07:44 -08:00
bjorn
3bab6761da
webgpu: textures;
2022-12-03 14:00:12 -08:00
bjorn
efc81e4cec
Fix some gcc warnings;
2022-12-03 01:20:02 -08:00
bjorn
8f09f4fd63
webgpu: release samplers;
2022-12-02 23:41:52 -08:00
bjorn
2bbf3eec35
webgpu: sampler;
2022-12-02 23:32:28 -08:00
bjorn
d66b1e7ec8
webgpu: device;
2022-12-02 23:19:08 -08:00
bjorn
15d27fc91f
os_wasm: fix warnings;
2022-12-02 23:16:38 -08:00
Ilya
92c136bc73
Merge branch 'bjornbytes:master' into picofix
2022-12-01 21:20:33 +03:00
bjorn
e2c73edabb
Clear GPU memory pointer later;
2022-11-27 20:51:11 -08:00
bjorn
72ecd9cb04
Fix issue recycling GPU memory blocks;
...
When a memory block is used for host-visible memory, its mapped pointer
is tracked with the block. If that memory is freed and later re-used
for some non-mappable memory, the pointer never gets cleared, and so
code thinks the memory is mappable and tries to use the pointer.
2022-11-27 19:55:27 -08:00
Josip Miskovic
cbe3c45548
Trim whitespace in Texture:hasUsage name
2022-11-26 17:41:48 -08:00
bjorn
cad98d8b2b
Mat4:reflect;
...
Creates a matrix that reflects across a plane given as a position and
normal vector.
2022-11-26 15:34:58 -08:00
bjorn
f9d7742dfd
Add support for headless headset rendering;
...
Although the name is unfortunate, this allows access to lovr.headset
when no window is opened or when the graphics module is disabled. This
requires the XR_MND_headless extension to be supported by the runtime.
2022-11-26 14:40:39 -08:00
Ilya Chelyadin
13d8c4a207
Interaction profiles suggestion improvement
...
At least one profile should be supported. Monado fails on Neo 3 profile.
2022-11-25 21:16:42 +03:00
bjorn
4422df2a47
Variant small string optimization;
2022-11-24 15:40:43 -08:00
bjorn
0c281bca50
Change default setProjection far plane to 0;
...
It was accidentally left at 100, which will cause problems.
2022-11-24 14:58:40 -08:00
bjorn
e9776f98c6
Fix compatibility with Lua 5.2, 5.3, 5.4;
...
Part of this involved putting the Lua header back in api.h, since we
need to know the Lua version to define some macros properly.
2022-11-24 14:33:55 -08:00
bjorn
8f74778c19
Error if require path is too long instead of truncating;
2022-11-23 14:08:32 -08:00
bjorn
e426520144
Blob:getString takes an optional byte range;
2022-11-23 12:21:32 -08:00
bjorn
53da4dd1dc
rm File again;
...
forks please yell if you still need it
2022-11-23 11:58:42 -08:00
Ilya Chelyadin
3f20364c3f
Pico is back!
...
Tested on Pico Neo 3 with PUI v4.9.3
Also included generic (Monado-Android) Android flavor.
2022-11-22 22:01:13 +03:00
s-ol
043f9c7920
store headset model metadata for animations
2022-11-22 12:24:57 +01:00
s-ol
533e02771e
throw when model references external asset but no 'io' is given
2022-11-22 12:24:31 +01:00
s-ol
3f8e137469
implement XR_MSFT_controller_model
2022-11-22 12:24:25 +01:00
bjorn
dbdd22ae95
Compute passes release their shaders properly;
...
Active shader was only getting released for render passes.
2022-11-21 19:52:41 -08:00
bjorn
7f2618227f
Fix off-by-one tick number in readbacks;
...
Only when a readback is read back before a pass is created.
Should really change gpu to know if the frame has started yet and adjust
the tick index accordingly.
2022-11-21 19:42:41 -08:00
bjorn
0c966ba216
gpu: destroy readback scratchpads properly;
2022-11-21 19:42:13 -08:00
bjorn
be3faf8822
Fixes for Vulkan initialization;
2022-11-17 20:32:24 -08:00
bjorn
3879ce926d
Improve Vulkan initialization;
...
- Check for layers before enabling
- Check for instance/device extensions before enabling
Fixes unfriendly errors when running on a system without validation layers
installed.
Uses same table approach as OpenXR code.
2022-11-16 20:21:03 -08:00
bjorn
7b3e1a02eb
Fix newShader when nil is used as a stage's code;
2022-11-16 18:12:06 -08:00
bjorn
6d1bbe9c5c
Fix Android build on new NDKs;
...
Some Android header defines DEPTH, which clashes with a symbol in the
OpenXR driver. This change just stops using Android headers in there
and declares more granular private functions. It also removes a few
unused private os functions.
2022-11-15 20:35:39 -08:00
bjorn
58dc7ee9dd
Add missing check for sample usage in material textures;
2022-11-14 20:10:23 -08:00
bjorn
b61dbab21b
newTexture resets usage when table is provided;
2022-11-14 20:03:58 -08:00
bjorn
c2f12f1fd4
Fix matrix rotation decomposition when matrix has scale;
...
Similar to mat4_getAngleAxis, quat_fromMat4 and mat4_getOrientation need
to divide by the scale.
2022-11-14 19:46:01 -08:00
bjorn
9277b38273
Use fancy syntax for model data map indices;
...
Matches nodes.
2022-11-14 19:20:29 -08:00
bjorn
d5ebb796b3
Mat4:set uses TRS order when scale is present;
2022-11-14 19:19:23 -08:00
bjorn
c61d6b059b
Merge branch 'master' into dev
2022-11-14 19:19:17 -08:00
s-ol
c3494d3d30
Fix Model:getNodeScale()
2022-11-14 08:02:13 -08:00
s-ol
7dbdda1205
Fix node indexing for GLTF models with multiple root nodes
2022-11-14 08:02:13 -08:00
s-ol
773d22f40d
Check bounds in luax_checkanimation / luax_checknodeindex
2022-11-14 08:02:13 -08:00
bjorn
7d3cc45cc2
LÖVR submodule improvements;
...
- Allow parent CMake projects to expose symbols more easily
- Allow for custom plugins folder
- Include directories are always relative to lovr's source dir
Co-authored-by: Ilya Chelyadin <ilya77105@gmail.com>
2022-11-09 22:42:50 -08:00
bjorn
cacc5eae71
ModelData:getTriangles reuses vertices better;
...
ModelData:getTriangles currently adds a fresh set of vertices for every
mesh in a node. This is technically correct, but it wastes space when 2
nodes reference the same set of vertices with different index buffers,
which is pretty common when a node has multiple materials. It also
breaks ODE, who doesn't like it when vertices outnumber indices too
much.
2022-11-09 22:22:51 -08:00