Commit graph

21360 commits

Author SHA1 Message Date
RaveYard
9595bd3b7a Fix sample distance power of two rounding 2023-09-25 21:20:08 +02:00
RaveYard
5c60c9473f Remove unused code from vk_lightmap.cpp 2023-09-25 21:20:08 +02:00
RaveYard
73f3d9166f Remove awful hardcoded byte offset hack 2023-09-25 21:20:08 +02:00
RaveYard
834480995c Fix lightmapper running background tasks forever 2023-09-25 21:20:08 +02:00
RaveYard
9b3a3c6115 Somehow fix lightmaps being corrupted in debug build 2023-09-25 21:20:08 +02:00
RaveYard
f9580f081e Change surfaceIndices to surfaces 2023-09-25 21:20:08 +02:00
RaveYard
8e3b29de33 Fix floors not being updated 2023-09-25 21:20:08 +02:00
RaveYard
f0b1739b2d Visible surfaces are gathered in processing (gathering) render phase and lightmaps drawn before rendering 2023-09-25 21:20:08 +02:00
RaveYard
f279fa69f4 WIP refactoring of surface gathering 2023-09-25 21:20:08 +02:00
RaveYard
f78739196f Fix 3D floors not being marked as seen 2023-09-25 21:20:07 +02:00
RaveYard
2bdb495498 Minor refactor and fix 3d floors not being detected for lightmap updates 2023-09-25 21:20:07 +02:00
RaveYard
934ba83503 Add cvar lm_scale for multiplying resolution of the lightmap 2023-09-25 21:20:07 +02:00
RaveYard
8f202a7e96 Fix off by one 2023-09-25 21:20:07 +02:00
RaveYard
995de6f71d Update lightmapper and add limiter to updates 2023-09-25 21:20:07 +02:00
RaveYard
acc50ef36e Fix surface index passed to glsl 2023-09-25 21:20:07 +02:00
RaveYard
710e151c06 Add walls to the lightmap 2023-09-25 21:20:07 +02:00
RaveYard
17ac3c27b4 Extend lightmapping stat 2023-09-25 21:20:07 +02:00
RaveYard
d19a73641a WIP partial lightmapping 2023-09-25 21:20:06 +02:00
RaveYard
5fc7a4dc41 WIP surface list for raytracing 2023-09-25 21:20:06 +02:00
RaveYard
3a6d5586ef Fix normals in wall surfaces that are squished into triangles 2023-09-25 21:20:06 +02:00
RaveYard
3e96e9010e Fix hw_vertexbuilder lightmap nullptr error 2023-09-25 21:20:06 +02:00
RaveYard
dae78e2a2c Blur changes to avoid darkening the edges 2023-09-25 21:20:06 +02:00
RaveYard
eb7e3faf06 CPU tracelight portal fix 2023-09-25 21:20:06 +02:00
RaveYard
98403698cd Add ZDRay light intensity support 2023-09-25 21:20:06 +02:00
RaveYard
5a91e8573e Add ZDRay light intensity support 2023-09-25 21:20:06 +02:00
Magnus Norddahl
0f77187d25 Fix clearing frame buffer when flushing 2023-09-25 21:20:05 +02:00
Magnus Norddahl
e579095840 Clear raytrace framebuffer when drawing into it 2023-09-25 21:20:05 +02:00
Magnus Norddahl
64358712f0 Muted some warnings 2023-09-25 21:20:05 +02:00
RaveYard
bef1c27600 Fix InitLevelMesh called before line portals are set 2023-09-25 21:20:05 +02:00
Magnus Norddahl
04941cab43 Add missing file and only include static lights in the lightmaps 2023-09-25 21:20:05 +02:00
RaveYard
8fa46c722d Line portal support 2023-09-25 21:20:05 +02:00
RaveYard
efeab91a75 Sector portals sunlight only 2023-09-25 21:20:05 +02:00
Magnus Norddahl
cd6dd34f72 Add the 3x3 blur 2023-09-25 21:20:05 +02:00
Magnus Norddahl
efea99b87c Only recreate lightmap texture if its size changes 2023-09-25 21:20:05 +02:00
Magnus Norddahl
bfc5684e0c Reuse lightmap baking textures between calls to Raytrace 2023-09-25 21:20:04 +02:00
RaveYard
fd4496f360 Round sampledist to power of 2 2023-09-25 21:20:04 +02:00
RaveYard
18a873923f Read ZDRay info thing 2023-09-25 21:20:04 +02:00
RaveYard
efbbdc2925 Read lm_sampledist properties from map geometry 2023-09-25 21:20:04 +02:00
RaveYard
9bd20ce5a8 Fix the lightmapper ceiling/floor plane calculations 2023-09-25 21:20:04 +02:00
RaveYard
194d5fcf87 Fix use of uninitialized variables boundsMin and boundsMax 2023-09-25 21:20:04 +02:00
RaveYard
3bbfb673cb Enhance dumplevelmesh 2023-09-25 21:20:04 +02:00
Magnus Norddahl
8515661b1a Delay finding the light lists until after map has loaded 2023-09-25 21:20:04 +02:00
Magnus Norddahl
ab539d85d2 Add lights to surfaces 2023-09-25 21:20:03 +02:00
Magnus Norddahl
a11152320f Remove some unused code 2023-09-25 21:20:03 +02:00
Magnus Norddahl
4c9cd2bd34 Release the resources so the lightmapper can run again 2023-09-25 21:20:03 +02:00
Magnus Norddahl
ab370c7a91 Perform the copy from the atlas resolve image to the lightmap texture on the GPU 2023-09-25 21:20:03 +02:00
RaveYard
3b0f19a57f Port BuildSmoothingGroups from ZDray 2023-09-25 21:20:03 +02:00
Magnus Norddahl
3c0b8ccc14 Use the command buffers from VkCommandBufferManager 2023-09-25 21:20:03 +02:00
Magnus Norddahl
634e6b2603 Finish upload before using buffers 2023-09-25 21:20:03 +02:00
Magnus Norddahl
ac962c80e3 Merge LightmapSurface into DoomLevelMeshSurface 2023-09-25 21:20:03 +02:00