1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00
Commit graph

4816 commits

Author SHA1 Message Date
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
Bjorn e0cb722225
Merge pull request #659 from jmiskovic/fix/acos
Fix acos domain error in angle between two Vec3
2023-03-25 10:44:03 -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 c871261946 CMake cleanup; 2023-03-12 15:07:23 -07:00
bjorn c42e784cd3 rm unused LuaJIT option;
GC64 is enabled by default.
2023-03-12 14:57:21 -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
Bjorn cf235588dd
Merge pull request #649 from mcclure/cpp-noreturn
Make 0.16 util.h compile correctly when included from a C++ file
2023-03-05 19:12:31 -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 6de1c624b4 Scope shader macros by the stage they're valid in;
Leads to better error messages if you try to use e.g. DefaultPosition in
a fragment shader.
2023-03-02 19:03:15 -08:00
bjorn ccffd3c1b2 Merge branch 'master' into dev 2023-03-02 18:31:20 -08:00