bjorn
6976a61464
Rename fill2d back to fill;
...
This rename was a mistake -- at the time I was thinking the fill shaders
were internal, but they definitely aren't.
2023-05-01 18:54:56 -07:00
bjorn
784440f5cb
OpenXR: Handle zero timestamps; Handle tracking loss better;
...
- If timestamp is zero (before .update is called), return empty data
instead of erroring.
- Check for valid position/orientation separately, and return empty data
for anything that's invalid. Previously both position/orientation
were used if either was valid, which returns undefined results.
2023-05-01 18:49:59 -07:00
bjorn
c115fd9c3a
Simplify shader resource tracking;
2023-04-29 19:06:08 -07:00
bjorn
f898a6f6b8
Linear allocator is no longer global to the graphics module;
...
Each Pass is gonna have its own allocator soon!
2023-04-29 18:35:01 -07:00
bjorn
f98306e786
rm transfer passes; rm Tally for now;
...
- Add Buffer:newReadback
- Add Buffer:getData
- Buffer:getPointer works with permanent buffers
- Buffer:setData works with permanent buffers
- Buffer:clear works with permanent buffers
- Add Texture:newReadback
- Add Texture:getPixels
- Add Texture:setPixels
- Add Texture:clear
- Add Texture:generateMipmaps
- Buffer readbacks can now return tables in addition to Blobs using Readback:getData
Tally is coming back soon with an improved API, it's temporarily removed
since it made the transfer rework a bit easier.
Note that synchronous readbacks (Buffer:getData, Texture:getPixels)
internally call lovr.graphics.submit, so they invalidate existing Pass
objects. This will be improved soon.
2023-04-29 18:31:03 -07:00
bjorn
775b6e4ff7
Rename some buffer helper functions;
2023-04-29 18:31:03 -07:00
bjorn
dbc59b6749
Trailing comma nit;
2023-04-28 20:36:43 -07:00
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
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
edb65a7578
Update glslang;
2023-04-19 20:49:30 -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
6c252a47b8
Don't declare builtin flags in compute shaders;
...
They aren't used, and increase file size and clutter up disassembly.
2023-04-05 21:53:39 -07:00
bjorn
747c7fdddf
Optimize blend shape shader;
...
This is ~20% faster, I think it's because all the SSBO stores are
"batched" at the end.
2023-04-05 21:53:39 -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
a2b12c9e7c
Vertex tangents don't require normalMap flag anymore;
2023-03-31 19:23:20 -07:00
Bjorn
7c557132f9
Merge pull request #653 from bjornbytes/blendshapes
...
Blend Shapes
2023-03-31 18:54:46 -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