Commit graph

54 commits

Author SHA1 Message Date
Ricardo Luís Vaz Silva
693413e606 replace vec4 list with proper struct for lights 2025-01-20 16:45:08 +01:00
Ricardo Luís Vaz Silva
728b6c0039 add portals/midtextures to ray-traced dynamic lights 2024-12-30 20:37:18 +01:00
Ricardo Luís Vaz Silva
f0efface7b deduplicate rayquery code 2024-12-30 20:37:18 +01:00
dpjudas
08282e9d5c Add readonly specifier to CopyBuffer 2024-12-08 13:00:36 +01:00
Magnus Norddahl
6867b0e9a6 Validation layer is complaining about missing readonly specifier on buffers in GLSL 2024-12-07 23:00:53 +01:00
Magnus Norddahl
7907c27c7c Reduce AO sample count from 128 to 16 2024-10-17 00:42:08 +02:00
Magnus Norddahl
92dd53703b Increase the bounce sample count 2024-10-17 00:29:25 +02:00
Magnus Norddahl
8bddbea0bd Turn off softshadow for bounces 2024-10-15 19:34:15 +02:00
Magnus Norddahl
4655b02f06 Fix using wrong surface for the extra BLAS structures for trace hits
Add gl_raytrace for ray tracing the level mesh
2024-09-05 00:15:59 +02:00
nashmuhandes
1a89307ee7 Rename SourceRadius to SoftShadowRadius 2024-06-15 18:08:37 +08:00
Magnus Norddahl
ab537a4879 Hook up SourceRadius 2024-03-05 16:37:59 +01:00
Magnus Norddahl
958251bfd4 Change the math for two-sided surfaces 2024-03-04 23:39:35 +01:00
Magnus Norddahl
b99cf589e7 Fix midtextures being opaque 2024-03-04 21:40:11 +01:00
Magnus Norddahl
c98930a88c Atlas tile adjustments 2024-02-28 00:59:41 +01:00
Magnus Norddahl
60cdb871d2 Add light bounce 2024-02-26 17:00:28 +01:00
Magnus Norddahl
a831fdb027 Move monte carlo math functions to its own file 2024-02-26 16:21:04 +01:00
Magnus Norddahl
ccc5c259ad Grab the light list from the surfaces in the shader 2024-02-26 16:15:14 +01:00
Magnus Norddahl
68f9fee55b Make the light list part of the level mesh 2024-02-26 15:57:32 +01:00
Magnus Norddahl
1a7407944e Always use indirect draw 2024-02-11 02:12:18 +01:00
Magnus Norddahl
94eb96a235 Fix trace bug for when rayquery is not available 2024-02-10 00:55:29 +01:00
Magnus Norddahl
2bfa8b0ee5 Fix AO not appearing and some other tracing adjustments 2024-02-10 00:13:51 +01:00
Magnus Norddahl
c1d0963da4 Rewrite the GLSL ray trace code so it does not use global variables!!
Fix portals not working
2024-02-09 12:08:16 +01:00
RaveYard
9534e7b76e Increase and unify max distance for sunlight rays 2024-01-01 14:36:08 +01:00
Magnus Norddahl
48b6a7ec46 Split level mesh surface from lightmap tiles as we have multiple surfaces per tile 2023-12-26 04:31:00 +01:00
Magnus Norddahl
f550f5b05a Hook up bindless textures for gl_levelmesh 2023-12-26 04:30:55 +01:00
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