Commit Graph

11152 Commits

Author SHA1 Message Date
Bill Currie 5d9bf32d3c Merge branch 'vulkan' 2021-03-23 12:31:58 +09:00
Bill Currie 7e946a4de9 [vulkan] Implement water surface rendering
They're unlit (fullbright, but that's nothing new for quake), but
working nicely. As a bonus, sort out the sky pass (forced to due to the
way command buffers are used).
2021-03-23 12:24:24 +09:00
Bill Currie 6e0312658d [vulkan] Fix sky depth issues
There were actually several problems: translucency wasn't using or
depending on the depth buffer, and the depth buffer wasn't marked as
read-only in the g-buffer pass. Getting that correct seems to have given
bigass1 a 0.5% boost (hard to say, could be the usual noise).
2021-03-23 11:26:24 +09:00
Bill Currie 5ac807d4b2 [vulkan] Remove the old forward renderpass spec
I doubt I'll go back to it, and it was in the wrong place anyway.
2021-03-23 10:12:26 +09:00
Bill Currie d4e1bfb8b8 [vulkan] Clean up the pipeline specifications
While being able to write pipeline specs like this was the end goal of
the parsing sub-project, I didn't realize it was already usable. This
sure makes going through the pipeline specs much easier.
2021-03-23 10:01:13 +09:00
Bill Currie 81956095f1 [vulkan] Use correct vertex shader for skys
This gets skys rendering again, but their depth is incorrect.
2021-03-23 08:25:56 +09:00
Bill Currie de581501fb [vulkan] Early out from lights that are too distant
Gives a 43% speed boost to bigass1 timedemo (366 -> 525 fps).
2021-03-22 20:33:42 +09:00
Bill Currie 4eecbe867d [vulkan] Implement deferred emission (fullbrights)
That was... easier than expected. A little more tedious that I would
have liked, but my scripting system isn't perfect (I suspect it's best
suited as the output of a code generator), and the C side could do with
a little more automation.
2021-03-22 19:08:16 +09:00
Bill Currie 5173414d97 [vulkan] Implement light styles
Other than dealing with shader data alignment issues, that went well :).
Nicely, the implementation gets the explicit scaling out of the shader,
and allows for a directional flag.
2021-03-22 13:13:26 +09:00
Bill Currie 410fecd67b [client] Fix the transform memory leak
The transforms aren't actually freed at the end (more work), but at
least they aren't lost any more, though one is still lost for the
viewent (weapon). The obvious fix didn't work.
2021-03-21 23:05:13 +09:00
Bill Currie 1f8c4465a2 [gamecode] Make non-clearing version of PR_RESNEW 2021-03-21 23:03:11 +09:00
Bill Currie ce2ffac078 [entity] Free all memory in the unit test
Now I know that deleting transforms works properly.
2021-03-21 22:33:57 +09:00
Bill Currie 56cf181a11 [gamecode] Make PR_RESMAP macros more function-like
I never liked that some of the macros needed the type as a parameter
(yay typeof and __auto_type) or those that returned a value hid the
return statement so they couldn't be used in assignments.
2021-03-21 21:26:36 +09:00
Bill Currie 003910612a [entity] Fix tests for changed forward/right
I had forgotten that Quake has forward as +X and right as -Y (still a
right-handed system, just that with X forward, Y points left).
2021-03-21 20:45:43 +09:00
Bill Currie 1bafd88a27 oops plist 2021-03-21 20:40:02 +09:00
Bill Currie cc4167668c Fix a pile of leaks and uninit errors
Still "some" more to go: a pile to do with transforms and temporary
entities, and a nasty one with host_cbuf. There's also all the static
block-alloc lists :/
2021-03-21 19:56:17 +09:00
Bill Currie a3c1b2e992 [util] Rename qfplist.[ch]
The name is a hold-over from before the current quakeforge tree and the
QF include directory.
2021-03-21 16:13:03 +09:00
Bill Currie 66e6627780 [vulkan] Use the correct character data
I got tired of not being able to read 90% of quake's output :P
2021-03-21 11:37:36 +09:00
Bill Currie 6e0cc59e8f [util] Make wad lump failure a soft error
Can't recover from an error if the program is swept out from underneath
you.
2021-03-21 11:36:18 +09:00
Bill Currie 9e633e7230 [qflight] Remove minlights
It seems to be have been DOA (even in the original qutils light).
2021-03-21 10:11:53 +09:00
Bill Currie 7650df3400 [model] Handle brush models with empty texture slots
It seems some maps have some empty texture slots (eg, e1m2).
2021-03-21 10:08:44 +09:00
Bill Currie 0a79348ce9 [vulkan] Tweak the lighting to look a bit better
Reduced the gamma correction a bit and increased the intensity of
dynamic lights. Not sure the latter is correct, but it looks much
better.
2021-03-20 19:15:06 +09:00
Bill Currie cadea27577 [vulkan] Disable lightmap support
Hopefully, it won't be needed.
2021-03-20 18:02:27 +09:00
Bill Currie 0246e55983 [vulkan] Support colored lights
Now my dizzy map looks like it used to (more or less, possibly too dark,
but I suspect I used some command-line settings to qflight).
2021-03-20 16:50:37 +09:00
Bill Currie dccd6989b2 [vulkan] Implement gamma correction
Currently hard-coded to 0.67 (1/1.5), but it does the job for now.
2021-03-20 16:50:11 +09:00
Bill Currie bab3e0720f [vulkan] Implement real-time lighting
Light styles and shadows aren't implemented yet.

The map's entities are used to create the lights, and the PVS used to
determine which lights might be visible (ie, the surfaces they light).
That could do with some more improvements (eg, checking if a leaf is
outside a spotlight's cone), but the concept seems to work.
2021-03-20 16:08:44 +09:00
Bill Currie e0eacf4014 [model] Make set and mix versions of Mod_LeafPVS
The re-entrant version was a good start, but being able to mix while
decompressing saves having to have a temporary buffer somewhere.
2021-03-20 16:06:15 +09:00
Bill Currie e3444b726f [model] Add a re-entrant Mod_LeafPVS
Double benefit, actually: faster when building a fat PVS (don't need to
copy as much) and can be used in multiple threads. Also, default visiblity
can be set, and the buffer size has its own macro.
2021-03-20 12:13:58 +09:00
Bill Currie 0ace799b27 [util] Support commands with a data parameter
Useful for avoiding a pile of wrapper functions that merely pass on
command-specific data to the actual implementation. Used to clean up the
wrappers in nq and qw cl_input.c
2021-03-20 03:56:16 +09:00
Bill Currie dc7cb97481 [qw] Remove viewangles from client state
Other than the one line in cl_pred.c, it's redundant, but it looks to be
just a redundant copy from ancient times.
2021-03-20 02:24:47 +09:00
Bill Currie 5cf1da7c25 [client] Finish moving onground to viewstate
Missed this in the entity cleanup (really, should have been separate
commits, but oh well).
2021-03-20 00:58:37 +09:00
Bill Currie 82e58dae5f [qw] Disable lerping on player model change
This seems to be an ancient bug, but may have been exposed by the recent
entity changes (was certainly highlighted by Vulkan)
2021-03-20 00:08:21 +09:00
Bill Currie 8f7d6b1d02 [vulkan] Initialize skins
This allows the qw client to run with Vulkan.
2021-03-20 00:08:21 +09:00
Bill Currie 5bf21931c7 [renderer] Remove more old fields from entity_t
The only transform related field remaining is old_origin. This also
brings the renderer closer to using simd (lots of stuff to fix still,
though).
2021-03-20 00:08:21 +09:00
Bill Currie 5158cc5527 [util] Add normal and magnitude float vector functions 2021-03-19 11:09:57 +09:00
Bill Currie 2015474468 Move and clean up clview.h
Redundant or dead prototypes deleted, and the client/view.h seems a good
place for the file.
2021-03-12 11:48:53 +09:00
Bill Currie 8466de2325 [client] Use vec4_t in entity_state_t
And clean up the mess (sort of:P)
2021-03-11 16:19:49 +09:00
Bill Currie 36761192a6 [qw] Partially clean up muzzle flash handling
It needs some more work (see FIXME in the code).
2021-03-11 15:23:35 +09:00
Bill Currie ca38f9b616 [qw] Use entity_state_t as a base for player_state_t
This will, in the long run, help clean up a lot of the differences in
the handling of entities in the clients.
2021-03-11 14:27:36 +09:00
Bill Currie c9bbc2971a [qw] Rename view_message to view_state
Makes more sense to me.
2021-03-11 12:47:08 +09:00
Bill Currie abaccbec53 [client] Move qw's loc code into client
This makes the location code available to nq (not used yet) but more
importantly moves some definitely client-side code into the right place.
2021-03-11 11:53:38 +09:00
Bill Currie b8267f2edd [client] Merge nq/qw entity effects code 2021-03-11 11:25:04 +09:00
Bill Currie 51e8694195 [qw] Use a dynamic array to track static entities
This takes care of another fixme in the cleanup of entity_t.
2021-03-11 09:11:08 +09:00
Bill Currie c05a15dec5 [glsl] Use vec4f_t in a few more places
No idea if it makes a noticeable speed difference, but it makes a huge
readability difference.
2021-03-10 21:17:34 +09:00
Bill Currie 62cce7f98c [gl] Remove some more warts
seeing ptexels and pixels together is very confusing
2021-03-10 21:15:53 +09:00
Bill Currie 5949753579 Make m3vmulf return v[3] unchanged 2021-03-10 19:40:19 +09:00
Bill Currie 169e0192f2 [gl] Use the correct value for sqrt(0.5)
707106781 looks right, but isn't quite.
2021-03-10 19:06:15 +09:00
Bill Currie 56d84ef63e [gl] Fix the compressed sprites
Seems to be an ancient bug.
2021-03-10 18:35:35 +09:00
Bill Currie 693225a16f [util] Add a fixme for a comment
The code itself is fine, but the comment is rubbish because it's
confusing, though essentially correct.
2021-03-10 18:05:12 +09:00
Bill Currie 098ceed5ff [client] Merge nq and qw temp entity handling
This finally gets cl_tent merged away.
2021-03-10 18:04:18 +09:00