Magnus Norddahl
ff4d4fe56d
Merge pull request #41 from MrRaveYard/pr_cull_tasks
...
Discard tasks for CPURaytracer that are not on the surface
2022-07-03 22:25:08 +02:00
RaveYard
00a4e6a73e
Discard trace tasks for CPURaytracer that are outside of any real geometry
2022-07-03 21:32:42 +02:00
Magnus Norddahl
bc0f419fff
Add ambient occlusion
2022-07-03 13:22:17 +02:00
Magnus Norddahl
b67f265c75
Move pipeline barrier to a more logical location
2022-07-03 03:10:39 +02:00
Magnus Norddahl
6e8757649c
Trace the sun
2022-07-03 02:57:05 +02:00
Magnus Norddahl
1d51bc17de
Fix triangle strip not covering the entire tile
2022-07-03 02:01:01 +02:00
Magnus Norddahl
65445a7b07
Implement enough of a ray query raytracer that it at least outputs something
2022-07-03 01:47:11 +02:00
Magnus Norddahl
12ffde80bc
Minor code cleanup
2022-07-02 05:18:08 +02:00
Magnus Norddahl
2898242f12
Remove prototype declaration missing from last commit
2022-07-02 01:37:32 +02:00
Magnus Norddahl
1bb8408b75
Create the output framebuffer
2022-07-02 01:36:28 +02:00
Magnus Norddahl
582cd7f7c0
RunAsync serves no purpose anymore as it now doesn't actually do anything in the main thread
2022-07-02 01:35:52 +02:00
nashmuhandes
496b1cb783
Print the hex representation of the sun color, too (might be useful for user's reference)
2022-07-01 14:46:02 +08:00
nashmuhandes
e2ff176e3a
Use integer for the sun color. UDB's color picker actually stores the color as an int when you save the map (despite exposing it in the UI as XXRRGGBB).
2022-07-01 14:34:55 +08:00
Magnus Norddahl
71c6552258
Prepare the vertex shader to draw without a vertex buffer
2022-06-30 23:59:37 +02:00
Magnus Norddahl
8ec576c3bd
Begin work on a new GPU raytracer that uses ray queries instead of the raytracing pipeline
2022-06-30 23:26:31 +02:00
RaveYard
04d8aabc92
Fix ambient occlusion pass not considering sky as a miss
2022-06-30 15:55:44 +02:00
RaveYard
443d447fcb
Remove unused indirect samples buffer
2022-06-30 12:31:28 +02:00
Magnus Norddahl
44b1d90968
Fix missing ShInitialize call
2022-06-30 10:42:10 +02:00
Magnus Norddahl
d88c2ef41c
Update builders to use the new form also used by the gzd backend
2022-06-29 20:12:36 +02:00
nashmuhandes
29d38a2969
Suffix _line to the linedef sample distance UDMF property as its naming is too close to the ZDRayInfo sample distance property
2022-06-29 15:04:52 +08:00
nashmuhandes
18e291c13a
Update documentation (per surface sampling distance)
2022-06-29 14:56:19 +08:00
RaveYard
023d75f879
Add line_horizont support
2022-06-24 22:39:29 +02:00
RaveYard
4d40108906
Fix top side textures not counting towards sky
...
I checked how GZDoom and chocolate Doom behave and it turns out that the top texture is irrelevant
but the bottom one is relevant
2022-06-24 22:36:42 +02:00
RaveYard
ce3060708d
Add --dump-mesh option and improve LevelMesh::Export
2022-06-24 20:53:44 +02:00
RaveYard
867af9edcc
Update CheckSkySectors to consider floors
2022-06-24 16:24:03 +02:00
RaveYard
3e701313dc
Fix printf and conversion warnings
2022-06-24 14:00:15 +02:00
RaveYard
114b5c68d2
Fix certain broken normals
2022-06-22 14:30:56 +02:00
RaveYard
038259a590
Add support for most common slope types
...
Certain actors used to make slopes aren't still supported
2022-06-22 14:30:51 +02:00
RaveYard
152b5092b9
Display percentage progress instead of dots
2022-06-16 22:43:07 +02:00
RaveYard
0479d4fce3
Support customizable sampling distance per surface
...
- Fix sampleDistance UDMF
- Refactoring code
- Handle 3D floors sides via lm_sampledist_mid per each wall in the
applied sector
2022-06-16 15:33:28 +02:00
nashmuhandes
4107176f0d
Standardize and finalize the naming conventions for the new UDMF keys to everything lightmap-related to use an "lm_" prefix.
2022-06-15 23:32:26 +08:00
nashmuhandes
5124788013
Strip quotes from the sun color string
2022-06-15 19:24:43 +08:00
nashmuhandes
b2b4dd4cfc
- Moved ZDRayInfo properties back to UDMF keys... the idea to put these as thing args in the first place wasn't a good idea after all. :P
...
- Use a hex color string for the sun color on ZDRayInfo, because UDB's color picker usually uses strings for colors values.
2022-06-15 15:28:40 +08:00
nashmuhandes
3a1cf7fc43
Temporarily disable surface lights too. Same reason as previous commit
2022-06-15 14:52:08 +08:00
nashmuhandes
5bb277ff31
Disable light bounces for now, after some internal discussion pertaining to future improvements
2022-06-15 14:42:02 +08:00
RaveYard
f4479a17d5
Add default auto probe grid size
2022-06-14 19:51:05 +02:00
nashmuhandes
a0935ba604
If arg0str is used for a spotlight's color, convert that string to an int and pass that value as the light color. UDB's color picker interface uses the arg0str field for spotlight color.
2022-06-03 02:55:52 +08:00
nashmuhandes
bfb23302ef
- Report sun vector
...
- Various styling fixes to the messages
2022-02-20 08:42:30 +08:00
nashmuhandes
25345c2477
Replace Thing UDMF keys for the ZDRayInfo with args instead
2022-02-20 04:46:19 +08:00
nashmuhandes
05eed4d4a2
Add "line" suffix to the surface light keywords to clearly label their intended usage
2022-02-20 04:28:28 +08:00
nashmuhandes
f38995889d
Remove 'lightintensity' UDMF key from Things, replaced it with the Thing's alpha instead
2022-02-20 04:17:45 +08:00
nashmuhandes
7f822dd250
Use ZDRayInfo's angle and pitch to determine the sun direction
2022-02-16 06:42:33 +08:00
nashmuhandes
3f191651aa
For static light things, have ZDRay use args instead of UDMF keys. This aligns them with dynamic lights, and will help with UDB integration.
...
Only 'lightintensity' remains as a UDMF key, because there is no more free arg slots for it.
Also made constants for the various thing types to reduce coding mistakes.
2022-02-16 02:14:21 +08:00
nashmuhandes
15b31f0526
Only create lights for the actual static light things
2022-02-15 22:10:32 +08:00
Magnus Norddahl
c5d09682a0
Fix threadIndex mistakenly getting captured by reference
2022-02-15 14:35:32 +01:00
Kevin Caccamo
9ae145358f
Fix GCC compilation errors
2022-01-25 10:19:17 -05:00
Magnus Norddahl
0772f148c4
Improve the AO pass
2021-11-25 01:13:53 +01:00
Magnus Norddahl
bde4c60f82
Add an ambient occlusion pass
2021-11-24 03:37:46 +01:00
Magnus Norddahl
583f720007
Limit the number of lights per trace to 50
2021-11-16 02:15:14 +01:00
Magnus Norddahl
95232aedf4
Add progress dots for CPU tracer and streamline how they look
2021-11-16 00:57:06 +01:00
Magnus Norddahl
4cb0f59f66
Minor file structure cleanup
2021-11-16 00:30:54 +01:00
Magnus Norddahl
8b26826cee
Replace zlib with miniz as that is much easier to link with and removes a linker warning
2021-11-16 00:04:05 +01:00
Magnus Norddahl
955632f1f8
Remove worker class
2021-11-15 23:36:29 +01:00
Magnus Norddahl
e61f10af24
Flip surface sort order for better lightmap packing and add some border between the surfaces
2021-11-14 19:54:44 +01:00
Magnus Norddahl
346f71e60a
Improve lightmap atlas and add some more error checks
2021-11-13 04:52:13 +01:00
Magnus Norddahl
5d0fe12221
Align the uniforms as the Nvidia 10 series requires that
2021-11-13 01:06:36 +01:00
Magnus Norddahl
fc56a552fd
Remove the KHR_RAY_QUERY requirement as it isn't being used anyway
2021-11-13 00:43:53 +01:00
Magnus Norddahl
cb42f82bfc
Replace the vector/matrix classes with something behaving a bit more like glsl
2021-11-12 22:40:29 +01:00
Magnus Norddahl
6b4fef6a2b
Fix missing normalization of the first plane vector after cross product
2021-11-12 17:00:07 +01:00
Magnus Norddahl
2a91f530c9
Fix some more compile errors
2021-11-12 16:24:27 +01:00
Magnus Norddahl
e54477cb93
Fix linux compile errors
2021-11-12 17:08:15 +01:00
Magnus Norddahl
edc22ed06f
Fix the include error
2021-11-12 16:49:11 +01:00
Magnus Norddahl
581b87a745
Merge branch 'master' of https://github.com/dpjudas/ZDRay
2021-11-12 16:17:52 +01:00
Magnus Norddahl
04b01426e6
Add automatic fallback to CPU ray tracing if no vulkan device supports the ray tracing extension
2021-11-12 16:17:44 +01:00
dpjudas
d407d73c36
Remove unused code
2021-11-12 05:11:19 +01:00
dpjudas
f44e73d8d0
Fix error when baking a map with no lights in it
2021-11-12 05:07:57 +01:00
Magnus Norddahl
5035f3671f
Adjust usage print slightly
2021-11-11 05:52:40 +01:00
Magnus Norddahl
031dc4a4db
Move sample distance, bounces and light probe grid size settings to the zdrayinfo actor as they affect map visuals
2021-11-11 05:51:00 +01:00
Magnus Norddahl
cd3563759c
Rewrite the CPU ray tracer
2021-11-11 05:04:33 +01:00
Magnus Norddahl
96b31d8a69
Implement light probe tracing on the GPU
2021-11-10 02:25:03 +01:00
Magnus Norddahl
43bdb1cbca
Improve performance by tracing all lights in one shader
2021-11-10 00:37:56 +01:00
Magnus Norddahl
be1a94931b
Improve tracing times and remove the map size limitation
2021-11-09 19:53:45 +01:00
Magnus Norddahl
0c4199b281
Implement bounces and emissive surfaces
2021-11-07 23:52:44 +01:00
Magnus Norddahl
8df36944eb
Split shaders into three types (light, sun, bounce)
2021-11-07 04:05:19 +01:00
Magnus Norddahl
9ce4c027bd
Remove unused SurfaceLight class
2021-11-06 03:03:07 +01:00
Magnus Norddahl
ca5c48836f
Trace sunlight on the GPU
2021-11-06 02:51:36 +01:00
Magnus Norddahl
b12f31f182
Minor code clean up
2021-11-05 23:50:19 +01:00
Magnus Norddahl
9ebe31ee72
Remove the old dlight based ray tracer and add an option to choose between the CPU and GPU ray tracers
2021-11-05 23:42:01 +01:00
Magnus Norddahl
c7b220c2ba
Add surface and sunlight to the new CPU ray tracer
2021-11-05 23:31:23 +01:00
Magnus Norddahl
75798fae9b
Move glsl shader code to files
2021-11-05 18:23:31 +01:00
Magnus Norddahl
973a5b28b7
Improve direct light sampling quality
...
Fix command line argument bug
2021-11-05 03:17:06 +01:00
Magnus Norddahl
2efd031fa2
Raytrace direct light sources on the GPU
2021-11-05 00:19:38 +01:00
Magnus Norddahl
178c918af6
Fix closest hit and miss shaders not working
2021-11-04 20:24:38 +01:00
Magnus Norddahl
ef4b67ea04
Setup images for ray tracing and hook up renderdoc
2021-11-04 18:38:33 +01:00
Magnus Norddahl
f42c515b16
Oops, this wasn't meant to be committed
2021-11-03 23:31:24 +01:00
Magnus Norddahl
b1a06fda5e
Successfully call vkCmdTraceRaysKHR without validation errors
2021-11-03 23:30:57 +01:00
Magnus Norddahl
0b9705a1d8
Minor adjustments
2021-11-01 02:55:58 +01:00
Magnus Norddahl
d573f9e907
Create the pipeline
2021-11-01 02:20:57 +01:00
Magnus Norddahl
df1172346d
Remove old NV ray tracing builders
2021-11-01 02:20:41 +01:00
Magnus Norddahl
fb86b2054c
Move stack trace capture out of gpuraytracer.cpp
2021-10-31 19:20:23 +01:00
Magnus Norddahl
5d514f8c4b
Compile a rgen shader
2021-10-31 18:32:55 +01:00
Magnus Norddahl
edc4b159d0
Update shader builder to latest shader compiler version
2021-10-31 18:32:33 +01:00
Magnus Norddahl
b06f1b6128
Fix vulkan validation errors
2021-10-31 03:05:43 +01:00
Magnus Norddahl
1b29ef02b9
Create top level acceleration structure
2021-10-31 01:15:49 +02:00
Magnus Norddahl
0065d91f44
Build the bottom level acceleration structure using the KHR raytracing extension
2021-10-30 03:21:27 +02:00
Magnus Norddahl
3e11f81d5a
Add first steps in using the GPU for the ray tracing
2021-10-28 23:27:25 +02:00
Magnus Norddahl
47494dd3b2
Add a new raytracer that bounces using path tracing
2021-10-21 06:31:58 +02:00
Magnus Norddahl
f0c7e5fb9a
Merge branch 'master' of https://github.com/dpjudas/ZDRay
2021-10-20 05:28:51 +02:00
Magnus Norddahl
fa1d2fb215
Prepare the code for writing a new ray tracer
2021-10-20 05:28:41 +02:00
dpjudas
fb6cf06771
Fix compile error
2021-10-17 03:26:48 +02:00
Magnus Norddahl
e5816c7df4
Apply a 3x3 blur on the lightmap
2021-10-16 04:46:53 +02:00
Magnus Norddahl
c76bf98834
Remove sorting light probes by subsector
2021-10-15 04:22:04 +02:00
Magnus Norddahl
539bd9fd1d
Only create 3 probe layers per sector (covering the entire volume is too many probes)
2021-10-15 01:26:32 +02:00
Magnus Norddahl
199d5d7043
Remove unused function
2021-10-14 17:20:44 +02:00
Magnus Norddahl
a647f21501
Add the gzdoom model loaders
2021-10-14 17:12:05 +02:00
Magnus Norddahl
8f097378d5
Add the delauney triangulator (not used, but I don't want to lose this code in case I decide to use it after all)
2021-10-14 15:49:27 +02:00
nashmuhandes
f67852c9a8
Allow auto-probe grid size to be set on the command line
2021-10-14 16:56:04 +08:00
Magnus Norddahl
af83883b40
Merge branch 'master' of https://github.com/dpjudas/ZDRay
2021-10-14 06:13:40 +02:00
Magnus Norddahl
4f3005de9e
Add automatically generating a grid of light probes
2021-10-14 06:13:31 +02:00
nashmuhandes
6fa8bf706e
Change the sunlight DoomEdNum to 9890, to prevent clash with PointLightStatic
2021-10-05 13:11:12 +08:00
Magnus Norddahl
2f7b97854a
Update docs
2021-10-04 23:56:55 +02:00
Magnus Norddahl
3a1968782d
Add SunLight thing support
2021-10-04 23:47:19 +02:00
Magnus Norddahl
d8bf0bafc4
Add some code exporting the lit level mesh to .obj for debugging (helps figuring out if a problem is in GZDoom or ZDRay)
2021-10-02 22:15:57 +02:00
Magnus Norddahl
5f23b75c10
Fix some UDMF properties getting lost after merging the code with dlight
2021-10-02 04:26:26 +02:00
Magnus Norddahl
ef7caddb2c
Fix light probe Z coordinate
2021-09-25 19:55:17 +02:00
Magnus Norddahl
ba36819da9
Seems thing.height is not a reliable value in zdray?
2021-09-25 19:39:42 +02:00
Magnus Norddahl
53328e8f65
Don't try link the baked light probes with the original actors as that's problematic on the gzdoom end of things
2021-09-25 18:38:12 +02:00
Magnus Norddahl
3b57fa7f79
Merge remote-tracking branch 'nash/master'
2021-09-25 18:36:53 +02:00
nashmuhandes
d28ed6b9c8
Fixed spotlight math to match GZDoom's
2021-09-25 23:55:29 +08:00
Magnus Norddahl
fe282e6f6d
Add light probes
2021-09-25 17:47:21 +02:00
Rachael Alexanderson
c0aff53de5
- fix building in GCC-10
2021-09-25 06:11:38 -04:00
Magnus Norddahl
aebcfe4342
Remove light cells
2021-09-24 17:02:40 +02:00
Magnus Norddahl
82c0837928
Some mesh export functionality and name size changes, supposedly
2021-09-24 16:54:33 +02:00
Magnus Norddahl
28d7bb586f
- remove some code duplication
2018-12-31 17:37:19 +01:00
Magnus Norddahl
d03ded7f94
- move allocBlocks to LightmapTexture
2018-12-31 17:23:54 +01:00
Magnus Norddahl
79d0b257e1
- remove some old broken debug code
2018-12-31 16:53:16 +01:00
Magnus Norddahl
8f564c9210
- improve distribution of work between worker threads
2018-12-31 16:43:50 +01:00
Magnus Norddahl
96d705fbef
- change the multisample option to sample in a more predictable manner
2018-12-31 15:03:16 +01:00
Magnus Norddahl
78a3da5b8c
- make indirect light bounces optional (--bounce=1 to enable)
2018-12-30 22:24:20 +01:00
Christoph Oelckers
4dd0edbd3a
- also create 3D floor references if the tag is defined through 'moreIDs'.
2018-12-30 10:37:52 +01:00
Christoph Oelckers
72ad99fe96
- parse all data from the map to allow complete slope creation.
2018-12-30 10:18:35 +01:00
Christoph Oelckers
bb488236d1
- parse all needed fields from things for slope definition.
2018-12-30 09:27:28 +01:00
Christoph Oelckers
03a95e090f
- changed UDMF plane parser to use the same rules as GZDoom, namely to accept the plane only if all 4 parameters are present.
2018-12-30 09:04:23 +01:00
Magnus Norddahl
2555eec131
- simplify outer interface slightly
2018-11-10 00:47:20 +01:00
Magnus Norddahl
ce7074f646
- rename surfacelight file
2018-11-09 22:20:31 +01:00
Magnus Norddahl
b3250f4bac
- rename LightSurface to SurfaceLight
2018-11-09 22:17:36 +01:00
Magnus Norddahl
908c048464
- rename classes and enums that used the _t typedef convention
2018-11-09 21:55:07 +01:00
Magnus Norddahl
75e18b10e1
- normalize some whitespace and remove useless "documentation" comments
2018-11-09 21:46:34 +01:00
Magnus Norddahl
7756bba61f
- remove unused Pluecker and Rand classes
2018-11-09 21:28:03 +01:00
Magnus Norddahl
4ceab7cec7
- remove kex prefix from classes
2018-11-09 21:26:00 +01:00
Magnus Norddahl
9a84d487dc
- split map loading code from surface mesh code
2018-11-09 08:42:37 +01:00
Magnus Norddahl
73724c111c
- minor adjustments
2018-11-09 06:47:54 +01:00
Magnus Norddahl
b55a9671e5
- use the cheaper any hit test when possible
2018-11-09 06:21:25 +01:00
Magnus Norddahl
63715b855d
- add indirect light pass
2018-11-08 21:15:29 +01:00
Magnus Norddahl
ef3257e062
- Write light cells into the lump
2018-11-07 04:20:11 +01:00
Magnus Norddahl
2d970672e8
- add support for tracing light cells
2018-11-07 01:31:50 +01:00
Magnus Norddahl
639bc29085
- minor adjustments
2018-11-06 23:04:29 +01:00
Magnus Norddahl
57b39458f0
- spread light surface sample points evenly across walls
2018-11-06 14:58:05 +01:00
Magnus Norddahl
c3494a045d
- Fix the light surface math so the correct angles are being used
2018-11-06 12:50:58 +01:00
Magnus Norddahl
e046e7a508
- fix floor light surfaces not working
2018-11-06 11:08:02 +01:00