Commit graph

29 commits

Author SHA1 Message Date
Magnus Norddahl
240d68d7ae Merge SurfaceVertex with FFlatVertex and draw the lightmaps 2023-12-26 04:30:54 +01:00
Magnus Norddahl
9799bd70d1 Add vk_rayquery CVAR and prevent the shader from looping until the OS kills the entire process! 2023-10-04 20:11:09 +02:00
Magnus Norddahl
abf024a157 Fix the sunlight tracing bug 2023-10-04 03:31:29 +02:00
Magnus Norddahl
f2cfcc4635 Fix tile clipping 2023-10-04 01:24:20 +02:00
Magnus Norddahl
bbf73c2766 Apply surface angle to sun light 2023-10-04 00:46:29 +02:00
Magnus Norddahl
4f86a0ba81 Control ambient occlusion, sunlight and softshadows via cvars 2023-10-04 00:24:32 +02:00
Magnus Norddahl
be81f74954 Turn on backface culling 2023-10-01 13:08:57 +02:00
Magnus Norddahl
4e8e3aa546 Add soft shadows the lightmapper 2023-09-28 22:32:53 +02:00
Magnus Norddahl
987421451f Remove global variable return value hacks! 2023-09-26 23:04:12 +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
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
RaveYard
f23a18352c Use more accurate light formula for transparency 2023-09-22 15:43:11 +02:00
RaveYard
9f5e8b5e4d Minor cleanup and lightmapper fixes 2023-09-22 15:42:05 +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
RaveYard
8012f3bce3 Temporary measure to avoid crashing in non-rtx mode 2023-09-21 00:15:23 +02:00
RaveYard
eb134d3fbf Add color blending for lights 2023-09-21 00:15:23 +02:00
RaveYard
bf87748380 Fix uninitialized surface.TextureIndex crash and cleanup 2023-09-21 00:15:23 +02:00
RaveYard
19adf71ba9 Add alpha testing for TraceFirstHitTriangle 2023-09-21 00:15:23 +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
RaveYard
c8146d33b5 Fix lights being slightly shifted 2023-09-20 01:01:18 +02:00
Magnus Norddahl
bb7a33d7b1 Add bindless texture support 2023-09-19 23:58:17 +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
6e660ef023 Move vertex transform to the GPU 2023-09-18 02:42:12 +02:00
RaveYard
81497cadec Blur changes to avoid darkening the edges 2023-09-06 20:00:02 +02:00
Magnus Norddahl
10a5e4d466 Add missing file and only include static lights in the lightmaps 2023-09-05 17:47:55 +02:00
RaveYard
651903fe71 WIP VkLightmap integration 2023-08-31 22:57:56 +02:00
Magnus Norddahl
3750173eae Import ZDRay's GPURaytracer class as VkLightmap as the first step in letting the backend update them dynamically 2023-08-31 02:47:11 +02:00