Commit graph

81 commits

Author SHA1 Message Date
Magnus Norddahl
98c209edbd Rename VkLightmap and VkRaytrace 2023-12-26 04:30:58 +01:00
Magnus Norddahl
6a77924207 Group mesh buffers 2023-12-26 04:30:58 +01:00
Magnus Norddahl
6a971dbaf4 Remove the memory barrier again as such a guarantee is provided by vkSubmitQueue 2023-12-26 04:30:55 +01:00
Magnus Norddahl
418a76ecec Add pipeline barrier for draw indirect calls 2023-12-26 04:30:55 +01:00
Magnus Norddahl
f8fd08a623 Clean up VkDescriptorSetManager a bit and bind the surface uniforms when drawing with gl_levelmesh 2023-12-26 04:30:54 +01:00
Magnus Norddahl
240d68d7ae Merge SurfaceVertex with FFlatVertex and draw the lightmaps 2023-12-26 04:30:54 +01:00
Magnus Norddahl
e75e5a387b Merge remote-tracking branch 'gzdoom/master' into merge-gzdoom 2023-10-19 21:05:17 +02:00
dpjudas
58e4a01f62 Fix another descriptor pool out of memory error 2023-10-18 02:21:34 +02:00
Magnus Norddahl
9a334570f0 Add lm_dynamic UDMF boolean on sectors for marking if a sector should update its lightmap dynamically 2023-10-17 19:10:39 +02:00
Magnus Norddahl
9c6b2f190e Fix going out of bounds for the render area 2023-10-17 18:30:48 +02:00
dpjudas
84753ffaa7 Fix descriptor pool out of memory error 2023-10-17 01:42:46 +02:00
Magnus Norddahl
f532975754 Fix crash on maps with polyobjs 2023-10-09 23:32:48 +02:00
Magnus Norddahl
ef3074edfe Add lm_blur debugging cvar 2023-10-04 03:31:08 +02:00
Magnus Norddahl
a3820a0e1e Extend the baking border to avoid blur from neighbor tiles and fix unmap assert if the shader compile fails 2023-10-04 01:49:03 +02:00
Magnus Norddahl
4f86a0ba81 Control ambient occlusion, sunlight and softshadows via cvars 2023-10-04 00:24:32 +02:00
Magnus Norddahl
bcea260f33 Fix misc bugs related to the dynamic lightmap and polybsp lines in the lightmapper 2023-10-02 02:40:40 +02:00
Magnus Norddahl
b5095a4790 Group LightList variables 2023-09-30 21:46:27 +02:00
Magnus Norddahl
7bc52386f9 Make doom specific surface fields private to doom 2023-09-30 21:33:07 +02:00
Magnus Norddahl
757320c5bc Fix node buffers not working for the rayquery polyfill shader path
Rearrange how the upload code is done for the level mesh
2023-09-30 01:31:07 +02:00
Magnus Norddahl
743ba922b8 Split frag_raytrace.glsl into multiple files as it has become completely unreadable 2023-09-26 22:56:01 +02:00
Magnus Norddahl
65929d021f Add support for multiple meshes (DoomLevelSubmesh) 2023-09-25 23:28:49 +02:00
Magnus Norddahl
fae22f1bb7 Remove smoothing groups from vk_lightmap and fix some warnings 2023-09-25 20:35:34 +02:00
Magnus Norddahl
6bdc1d44b4 Prevent buffer overrun 2023-09-24 13:15:00 +02:00
Magnus Norddahl
e6f0fec1b8 Finish and enable the indirect draw calls, reducing the direct command buffer draw calls in the lightmapper to 5 2023-09-24 12:40:04 +02:00
dpjudas
8a40cf39d2 Prepare for doing indirect draw calls 2023-09-24 01:37:00 +02:00
Magnus Norddahl
1dd2605200 Retrieve the light list on the fly rather than try to sync it 2023-09-22 16:35:50 +02:00
Magnus Norddahl
6f4730d5ae Fix view index binding error 2023-09-22 11:31:50 +02:00
Magnus Norddahl
30db3feb5a Use a shader to copy the pixels as vkCmdCopyImage is very slow. Also gives us more flexibility in the future for composite lightmaps 2023-09-22 01:41:56 +02:00
Magnus Norddahl
9715f28917 Add lightmap stats to stat gpu 2023-09-21 02:07:50 +02:00
Magnus Norddahl
3213175e06 Minor adjustments 2023-09-21 01:45:48 +02:00
RaveYard
c525ec1b68 Add access to vertex indices in frag_raytrace.glsl 2023-09-21 00:15:23 +02:00
RaveYard
08b03f2d73 Add SurfaceVertex to store texture UVs 2023-09-21 00:15:23 +02:00
Magnus Norddahl
bb7a33d7b1 Add bindless texture support 2023-09-19 23:58:17 +02:00
Magnus Norddahl
90f046a579 Fix crash when trying to render outside the texture 2023-09-19 01:30:15 +02:00
Magnus Norddahl
110819ea05 Fix not setting the reset counter 2023-09-19 01:19:31 +02:00
Magnus Norddahl
285fbfe299 Only find the tile surfaces once
Only upload the lights once per surface participating in the baking
2023-09-19 01:17:03 +02:00
Magnus Norddahl
e5a4e6c85a Remove LightmapOrigin, LightmapStepX and LightmapStepY as we no longer use them 2023-09-19 00:47:47 +02:00
Magnus Norddahl
dca58bffa8 Don't change the viewport for every tile we trace 2023-09-19 00:25:32 +02:00
Magnus Norddahl
2e754c8106 Use the vertex and index buffers from the accelstruct 2023-09-18 17:39:06 +02:00
Magnus Norddahl
6e660ef023 Move vertex transform to the GPU 2023-09-18 02:42:12 +02:00
RaveYard
4e7e1d772b Reintroduce lm_max_updates 2023-09-16 15:13:16 +02:00
Magnus Norddahl
2178de0c6c - Fix VkRaytrace::Raytrace not working properly if called multiple times per frame.
- Only call VkRaytrace::Raytrace once per scene
2023-09-16 05:12:31 +02:00
RaveYard
e3e08c29b0 Fix lastSurfaceCount growing forever 2023-09-16 02:57:23 +02:00
Magnus Norddahl
d9b066ad37 Move the visible surface list to HWDrawInfo 2023-09-15 20:45:03 +02:00
Magnus Norddahl
651b2ef9e3 Change lightmapper to only use one image 2023-09-15 18:07:37 +02:00
RaveYard
6606860550 Refactor CCMDs in doom_levelmesh.cpp 2023-09-14 19:14:35 +02:00
RaveYard
bbcc0c1e88 Add stat lightmap and surfaceinfo ccmd 2023-09-14 19:14:35 +02:00
RaveYard
7cd33cc060 Optimize which surfaces are passed to lightmapper 2023-09-14 15:14:59 +02:00
RaveYard
a340b69c79 Fix lightmapper still using hacks to detect levelmesh changes 2023-09-11 19:51:23 +02:00
Magnus Norddahl
b0d182c099 Fix some validation errors 2023-09-11 13:49:39 +02:00