Commit Graph

4389 Commits

Author SHA1 Message Date
bjorn 16860e8ef5 rm stats;
These stats don't make sense right now.
2022-08-04 07:59:07 -07:00
bjorn 7c7f8ed907 Free ModelData metadata; 2022-08-04 00:31:39 -07:00
bjorn eac3299bd0 ModelData:getMetadata; 2022-08-04 00:27:20 -07:00
bjorn a6d843c642 Fix desktop driver; 2022-08-04 00:12:41 -07:00
bjorn acd87a5e5c lovr.graphics.present;
It's nice to have an explicit action for presentation.
2022-08-04 00:06:54 -07:00
bjorn 8af3fffe2f Update OpenXR to 1.0.24; 2022-08-02 23:10:41 -07:00
bjorn 9b19a1cd47 Fix lovr.headset.animate; 2022-08-02 23:06:49 -07:00
bjorn d42cac288f Use anonymous union for ModelNode transform; 2022-08-02 23:03:52 -07:00
bjorn 10f2b727b6 glslang: auto map locations and binding numbers; 2022-08-02 22:06:44 -07:00
bjorn 89312c1c4b Add on-disk shader cache;
Set t.graphics.shadercache to true (the default) and lovr will
read/write a shader cache file from/to disk.
2022-08-02 22:06:44 -07:00
bjorn 4ee092e81b Make Pass a regular object;
It uses newPass instead of getPass.  Temporary objects had lifetime
issues that were nearly impossible to solve.  And normal objects are
easier to understand because they behave like all other LÖVR objects.

However, Pass commands are not retained from frame to frame.  Pass
objects must be re-recorded before every submit, and must be reset
before being recorded again.

Pass objects now provide a natural place for render-pass-related info
like clears and texture handles.  They also allow more information to be
precomputed which should reduce overhead a bit.

It is now possible to request a stencil buffer and antialiasing on the
window and headset textures, via conf.lua.

lovr.graphics.setBackground should instead set the clear color on the
window pass.  Though we're still going to try to do spherical harmonics
in some capacity.

There are still major issues with OpenXR that are going to be ironed
out, and the desktop driver hasn't been converted over to the new
headset Pass system yet.  So lovr.headset integration is a bit WIP.
2022-08-02 22:06:44 -07:00
bjorn 289f08b0df Fix OpenXR texture layer count; 2022-08-01 22:43:44 -07:00
bjorn d81d906f58 Fix; 2022-08-01 22:35:20 -07:00
bjorn 8952476e35 Adjust; 2022-08-01 22:14:49 -07:00
Josip Miskovic 31ca502034 Add isKeyDown 2022-08-01 22:13:30 -07:00
bjorn c0dfb414d6 Per-stage default shaders; 2022-08-01 22:10:06 -07:00
bjorn 67b338a1d8 Change default window size; 2022-08-01 21:46:00 -07:00
bjorn 4bb3405ff0 Add missing shader; 2022-08-01 21:26:34 -07:00
bjorn 8a5c09ac1b tup: Add -fPIE; 2022-08-01 21:24:41 -07:00
bjorn ac104e6f41 WIP stereo blit shader; 2022-07-31 13:26:35 -07:00
bjorn c4ff7cca39 Passes track their readbacks;
There are some issues with immediately tracking readbacks in the global
linked list of pending readbacks:

- The Pass might not get submitted, in which case the readback will be
  "dangling" and never complete (or it will erroneously think it's
  completed but its buffer will contain garbage data).
- Thread safety issues of modifying a global data structure from a Pass.

Instead, Pass will locally track the readbacks it performs, and only at
submit time will those readbacks get added to the global list.

(There is a little bit of refcounting mistakes now, those will get
cleaned up).
2022-07-31 13:02:41 -07:00
bjorn 6de50a83c4 Shader changes; 2022-07-31 12:49:18 -07:00
bjorn 50f596bd34 Default shaders use lovrmain; 2022-07-31 11:18:15 -07:00
bjorn 2414f5f269 Material uvShift can be a single number too; 2022-07-31 10:39:49 -07:00
bjorn 4919daa93b Small fixes; 2022-07-31 10:39:49 -07:00
bjorn e87cec1b49 Reduce number of materials per block; 2022-07-31 10:39:49 -07:00
bjorn 9e4765818a Rename texture depth to layer count; 2022-07-31 10:39:49 -07:00
bjorn 571c71b76e Rename pipeline stack to state; 2022-07-31 10:39:49 -07:00
Josip Miskovic 7c792fd975 Fix cylinder's triangle winding and normals 2022-07-31 09:38:40 -07:00
Kelsey Higham 50b321fb64 More beginner-friendly error message 2022-07-21 16:30:13 -07:00
bjorn ff39a7485b Update appveyor.yml; 2022-07-19 08:48:59 -07:00
bjorn a0173252b9 Slight improvement to lovr.mirror; 2022-07-17 20:07:31 -07:00
bjorn 922942a0bf Initialize Pass font properly; 2022-07-17 20:07:20 -07:00
bjorn d9623a51a9 Pass:setFont; 2022-07-17 19:53:31 -07:00
bjorn 24504d1719 Adjust; 2022-07-17 16:38:29 -07:00
bjorn d17131c421 Pass:cone; 2022-07-17 16:38:00 -07:00
bjorn 92201b87a1 Rename timer tally type to time; 2022-07-17 13:17:33 -07:00
bjorn 83fa750a4d Support and default to reverse-z with infinite far plane; 2022-07-17 12:37:59 -07:00
bjorn 1df537294a Improve Model texture loading;
- Only loads textures used by materials
- Creates color/glow textures as sRGB
2022-07-17 12:04:47 -07:00
bjorn c2dd7281cc mv stage tally -> shader tally; 2022-07-17 11:38:55 -07:00
bjorn 1946fbb540 Reduce default near plane;
I feel like we've (un)done this before...
2022-07-17 11:05:24 -07:00
bjorn 5d3e1f93cd Add d32fs8; 2022-07-17 11:03:00 -07:00
bjorn 7aab5ce79b Fix errhand; 2022-07-17 09:55:27 -07:00
bjorn 32346796ef Tally/Readback cleanup; 2022-07-17 09:50:15 -07:00
bjorn faa690b7f0 Material API;
Just returns everything as a table.  Some sort of key-value thing would
be nice but complicates the implementation.
2022-07-17 09:29:13 -07:00
bjorn 35d8a4c49c Tally API; 2022-07-17 09:05:39 -07:00
bjorn 430f687add Projection updates;
- Rename/reorder some projection matrix functions.
- Make perspective functions flip Y and use 0-1 NDC range.
- Flip winding and font vertices based on handedness.

This stuff is really confusing
2022-07-17 09:02:53 -07:00
bjorn 1bc31b7751 Revert accidental winding change; 2022-07-15 21:42:31 -07:00
bjorn e2bfff1b0a Tally/Readback fixes; 2022-07-14 19:23:02 -07:00
bjorn 45135899a1 Readback, mostly; 2022-07-14 00:05:58 -07:00