Commit Graph

391 Commits

Author SHA1 Message Date
Ivan Avdeev
4b363bc8f3 rtx: add profiler scopes for light cluster building 2021-10-20 11:58:53 -07:00
Ivan Avdeev
8756f648ca add trivial on-screen profiler printout 2021-10-20 11:58:53 -07:00
Ivan Avdeev
c45ac21a71 rtx: fix too early color culling 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
4dee7b48cf rtx: add initial spotlight support
not done:
- light cluster culling
- environment (directional-only lights, e.g. sun)
- proper names for things
2021-10-20 11:58:53 -07:00
Ivan Avdeev
af8a6413e4 rtx: tweak and improve point lights
- scaled down emissive surface lights by 10 (as in qrad)
- added more verbose light debugging
- move light tweaks away from shader, have different tweaks for
  different point light source types
- implement non-singular point light attenuation by yuksel
- improve point light adding
2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
4935340432 rtx: add qrad light intensity scaling 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
1b71237279 rtx: bring back naive point light implementation
- scale dlight intensity
- attenuate based on brdf
- early culling if color contribution is small
2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
832b719bed rtx: remove direct sun sampling attempt
apparently there's no singular sun. there are spot_lights (+light_environment) that function like a sun (directional light).
2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
208d7528ad rtx: move Lights buffer definition to common header 2021-10-20 11:58:53 -07:00
NightFox
119c73abfa fix +0~TNNL_LGT1 2021-10-18 23:36:42 -07:00
NightFox
64626c1601 fix +0~LIGHT2A 2021-10-18 23:36:42 -07:00
NightFox
d3faaa59f1 Almost perfect 2021-10-18 23:36:42 -07:00
NightFox
b8a5b55795 More correct 2021-10-18 23:36:42 -07:00
NightFox
a9b7982ba5 More correct vagonchik, shlakbaum 2021-10-18 23:36:42 -07:00
NightFox
4d9f228769 fix c0a0c 2021-10-18 23:36:42 -07:00
Ivan Avdeev
489d04f0ec
Merge pull request #109 from 0x4E69676874466F78/vulkan
Update rad
2021-10-13 23:53:37 -07:00
NightFox
108ad4d226 UPPERCASE 2021-10-14 03:14:52 +03:00
NightFox
3e7abee0e3 UPPERCASE 2021-10-14 03:13:13 +03:00
NightFox
a06f8e1c26 corrected c1a0b, c1a0c, c1a0e 2021-10-14 02:58:25 +03:00
NightFox
a9a85c6584 corrected c1a0a 2 2021-10-14 01:32:38 +03:00
NightFox
98241a977f corrected c1a0a 2021-10-14 01:08:49 +03:00
Ivan Avdeev
de8a7e10e9 rtx: update to use safe COM_ParseFile 2021-10-13 12:42:20 -07:00
Ivan Avdeev
cb07b2ffaf rtx: remove comment 2021-10-13 12:27:24 -07:00
Ivan Avdeev
8ffab567b9 rtx: dynamically cull and add moving surface lights 2021-10-13 12:27:24 -07:00
Ivan Avdeev
157af769ff rtx: add vk_lights_dump command
It prints out light clusters debugging info.
2021-10-13 12:27:24 -07:00
Ivan Avdeev
af83e47f41 rtx: revert c0a0/YELLOW to original value 2021-10-13 12:27:24 -07:00
Ivan Avdeev
72fcf52837 rtx: simplify toggling light clusters debug visualization in shader 2021-10-13 12:27:24 -07:00
Ivan Avdeev
846651565c rtx: explictly disable light sources with zero intensity 2021-10-13 12:27:24 -07:00
Ivan Avdeev
46722c4a37 rtx: depend on throughput when culling 2021-10-13 12:27:24 -07:00
Ivan Avdeev
1eadd60587 rtx: implement late light culling
the idea is to not do very expensive shadow ray when the resulting color
won't affect the visible pixel anyway.
2021-10-13 12:27:24 -07:00
Ivan Avdeev
f4c75ec08c rtx: slight clean up surface light culling code 2021-10-13 12:27:24 -07:00
Ivan Avdeev
520fedde2b rtx: cull light clusters by plane normals
(note that real pdf culling doesn't seem to be necessary, as shader
confirms that it's usually not culled that much)
2021-10-13 12:27:24 -07:00
Ivan Avdeev
19b8025fc6 rtx: add light clusters debug helpers
1. add a way to enable only certain lights
2. add commented out code to highligh affected light clusters, culling
   modes, etc.
3. add affected light clusters counter when collecting lights
2021-10-13 12:27:24 -07:00
Ivan Avdeev
20369dd9ab rtx: move push constant definition to a common place; specialize shader constants 2021-10-13 12:27:24 -07:00
Ivan Avdeev
417caad50b rtx: work around crash on map load
xash tries to render a couple of frames after map has been destroyed and
before the new one was created (R_NewMap called). vk_light expects map
to be there at all times, so it tries to reference things that don't
exist.

boom

here we just check that map exists, and if it doesn't we just skip
referencing lights.

no boom.
2021-10-13 12:27:24 -07:00
Ivan Avdeev
53fd5b6b23 rtx: compute lighting in hl-native units, remap color in the end (#98) 2021-10-13 12:27:24 -07:00
Ivan Avdeev
8f7bc69cb2 rtx: cull surface lights based on estimated light intensity 2021-10-13 12:27:24 -07:00
Ivan Avdeev
869c21e42d rtx: fix bsp visibility based light cluster generation
1. fix indexiing (+1)
2. fix rle skipping (*8)
3. fix bbox ranges (floorf .. ceilf)
2021-10-13 12:27:24 -07:00
Ivan Avdeev
3f90408108 work around stack corruption when parsing entities
we have a limited buffer for string when reading tokens and no way to
specify buffer space. just increase buffer size.

proper fix would be to change ref api to allow passing buffer size as an
argument.
2021-10-13 12:27:24 -07:00
Ivan Avdeev
4b0033985d rtx: construct light grid based on bsp visibility data
unfortunately it's broken and ends up producing incorrect light lists
per grid cells. we'll fix it eventually
2021-10-13 12:27:24 -07:00
Ivan Avdeev
87cb23eb8b rtx: collect per-leaf emissive surfaces with pvs data 2021-10-13 12:27:24 -07:00
Ivan Avdeev
9006d679ec rtx: associate msurfaces with mleafs 2021-10-13 12:27:24 -07:00
Ivan Avdeev
436ab8709e rtx: start collecting light sources per leaf 2021-10-13 12:27:24 -07:00
Ivan Avdeev
8b704ed9a6 handle externally provided swapchain resolution, fix #53 2021-09-24 20:58:01 -07:00
Ivan 'provod' Avdeev
6b1eb26c24 improve screenshot performance, fix #87
make sure that we use host_cached memory, otherwise device_local will be picked by default, which is very slow to read from.
2021-09-22 20:29:31 -07:00
Ivan Avdeev
fe52ff3d1a
Merge pull request #84 from 0x4E69676874466F78/vulkan
Update rad files
2021-09-21 08:57:26 -07:00
Ivan Avdeev
16df678fd2 fix linux build 2021-09-20 23:35:49 -07:00
Ivan 'provod' Avdeev
100ba22f0e rtx: add broken sun sampling
i cant into math. sun direction is completely incorrect
2021-09-20 23:35:49 -07:00
Ivan 'provod' Avdeev
f8b0b8c672 rtx: make light entity parsing extensible
x macros ftw
2021-09-20 23:35:49 -07:00
Ivan 'provod' Avdeev
fe931fcfd7 rtx: collect d/elights and static entity point lights
sample all of them unconditionally for now
2021-09-20 23:35:49 -07:00
Ivan 'provod' Avdeev
1953bf7b4f rtx: install known rads into valve/maps
fix #76
2021-09-20 23:35:49 -07:00
NightFox
70ae807b3d
+0~TNNL_LGT4 for c0a0d 2021-09-20 12:40:59 +03:00
NightFox
5e97b4dd28
Correction +0~TNNL_LGT4 for c0a0c
Do not tune rad files under rays while it is still unfinished, check only with qrad
2021-09-20 12:24:54 +03:00
NightFox
b5f263d56a
Correction +0~TNNL_LGT4 for c0a0c
Do not tune rad files under rays while it is still unfinished, check only with qrad
2021-09-20 12:22:01 +03:00
NightFox
907310c5bd
Update rad files
More correct light for c0a0c and c0a0d + correct RED for other rads.
2021-09-20 12:09:08 +03:00
NightFox
c68b82ca40
Added correct goldsrc era rad files ( #76 )
Base lights.rad/valve.rad from worldcraft v2.0 or HLSDK (thx Valve).
Base c1a0.rad and c1a0d.rad from HLSDK (thx Valve).
Some texture name get from hl_lights.rad by Hezus (thx Hezus and SNMetamorph for file).
Others was mined by me manually through bspguy and etc.

File structure and formatting redesigned.
Some numbers have been rounded for convenience.
Added splitting by WAD files (for the present only for lights.rad).

See README.txt for codestyle.
2021-09-18 17:08:01 +03:00
NightFox
add86b4018
Removed incorrect (source engine) rad files.
These rad files are not very useful for the goldsrc version.
2021-09-18 16:56:50 +03:00
Ivan 'provod' Avdeev
10127868ef rtx: skip RAD entries with "//" in the name, fix #42
Consider these to be commented out.
2021-09-16 11:09:21 -07:00
Ivan 'provod' Avdeev
31a5db1974 rtx: fix hit pos for translated brush modles, fixes #64
also add shadow offset to fix light flickering for moving sources
2021-09-16 11:09:21 -07:00
Ivan 'provod' Avdeev
4ff669c023 rtx: fix scratch buffer validation error, #69
New Vulkan SDK (1.2.189.2) has a new validation check that verifies that AS build scratch buffer has been created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT.
2021-09-16 11:09:21 -07:00
Ivan Avdeev
a7288eba69 fix linux build 2021-09-14 17:47:05 -07:00
Ivan 'provod' Avdeev
50200262df rtx: slightly improve black outlines on studio models (see #48)
The core of the issue is that there are backfacing interpolated normals, NdotL and/or NdotV end up being negative for them.
Things we tried:
1. Explicitly using geometry normals for some things. Doesn't really work that well.
2. Clamping NdotX to some small value instead of just ignoring light contribution. Works better, but there are still some artifacts.
2021-09-14 17:47:05 -07:00
Ivan 'provod' Avdeev
96709ac37c rtx: questionable attenuation for emissive surfaces
1. I suspect that we don't actually need to compute emissive contribution even for specular. Except when doing direct lighting.
2. Using emissive color as is looks orders of magnitude too bright. It should be scaled by something. But by what? Try to use to-metric mapping similar to direct lighting for testing.
2021-09-14 17:47:05 -07:00
Ivan 'provod' Avdeev
fbd8973a6d rtx: add command to reload rad files, fix #41
vk_rtx_reload_rad
2021-09-14 17:47:05 -07:00
Ivan 'provod' Avdeev
afa1e8557a rtx: fix c0a0d emissive toxic liquid, fix #56
It was missing msurface_t reference which is (unnecessarily) required for light clusters computation

Also add more verbose debug names for dynamic models.
2021-09-14 17:47:05 -07:00
Ivan Avdeev
3d0dafa8b4 fix rad filenames for maps 2021-09-11 15:47:16 -07:00
Ivan 'provod' Avdeev
7f1e6c8256 rtx: slightly improve (decrease) acne
how: we do not need to add emissive when doing diffuse gi bounce, as contribution from these lights will be computed in computeLighting.
They only need to be sampled for specular bounce.

The rest of the acne should be mitigated by denoiser i think.

Fix #51
2021-09-11 15:47:16 -07:00
Ivan 'provod' Avdeev
5ce91209ce rtx: load rad files from rad/<mapname>.rad, fix #43 2021-09-11 15:47:16 -07:00
Ivan Avdeev
cfe5612a3a attenuate area lights by projected area, fix #46
Also, tune "tonemapping"
2021-09-08 10:08:47 -07:00
Ivan Avdeev
0839f9673b update todo; move materials draft to separate file 2021-09-06 14:24:36 -07:00
Ivan Avdeev
ae12b4505d remove material flags 2021-09-06 14:24:36 -07:00
Ivan Avdeev
de611e159a assume textures are linear
this way it looks more like traditional renderer w/ lightmaps
2021-09-06 14:24:36 -07:00
Ivan Avdeev
2b2552cd72 fix rad file parsing
parsing strings in c is hard
2021-09-06 14:24:36 -07:00
Ivan Avdeev
86d669c708 enlarge scratch buffer to support more models 2021-09-06 12:03:44 -07:00
Ivan Avdeev
b9f5f87c76 bring back ray traced transparency
1. Probabilistically let ray through material or reflect it based on
   transparency probability (which is essentially just alpha for now).
2. Introduce opaque flag to be able to treat transparent objects as not
   casting shadows. This is not very realistic, but oh well.
2021-09-06 11:57:23 -07:00
Ivan Avdeev
9759221e02 rtx: fix linux build 2021-09-04 13:50:05 -07:00
Ivan 'provod' Avdeev
672b2de75a rtx: cascading rad sheets
Read rad data from lights.rad and then mapname.rad
2021-09-04 13:50:05 -07:00
Ivan 'provod' Avdeev
c90187f57f rtx: use a common definition for Kusok; pass color
Also pass alpha (not used yet)
2021-09-04 13:50:05 -07:00
Ivan 'provod' Avdeev
22e76513a4 rtx: better lighting scaling
Remove arbitrary lightness fudge in favor of proper distance scaling.
According to TEH INTERNETS one unit is one inch. So there are 39.37 units per meter.
Scale distances to meters for lighting calculations.
2021-09-04 13:50:05 -07:00
Ivan 'provod' Avdeev
36cfe22e8d rtx: add sbt hit entry w/o any hit
Majority of materials are without alphamask, so no need to have any hit shader
2021-09-04 13:50:05 -07:00
Ivan Avdeev
8cf040f9be rtx: improve emissive surface sampling
Sample a single triangle not in a loop.
2021-09-04 13:50:05 -07:00
Ivan Avdeev
e4aea1486f ingest more of brdf for bounces 2021-09-04 13:50:05 -07:00
Ivan Avdeev
9c330e4118 add brdfs for lights
Just straight copy-paste CC brdf header from Ray Tracing Gems 2 chapter
14.
Use these brdfs for direct lighting.
2021-09-04 13:50:05 -07:00
Ivan Avdeev
d8ebf5ac33 rtx: add emissive color, remove emissive flag 2021-08-31 11:19:44 -07:00
Ivan Avdeev
8d06058aa4 rtx: add first iteration of material flags support
it's clearly suboptimal, but no worries, we'll iterate
2021-08-31 11:19:44 -07:00
Ivan 'provod' Avdeev
0259c09e9a add swizzle for RGBA-BGRA format pair when saving screenshot
this is the pair that breaks on nvidia (yay there's at least one thing that amd is better at!)
2021-08-31 11:19:44 -07:00
Ivan Avdeev
280e6109c6 add screenshots
now vulkan can do screenshots too. however, it depends on blits being
available between swapchain and rgba8 formats, so if it's not the case
for some reason, the resulting image will have mixed components.
2021-08-31 11:19:44 -07:00
Ivan Avdeev
3b605a19b5 fix depth test for glow render mode; comments
also add a lot of observations to ref_vk/TODO.md related to materials
2021-08-31 11:19:44 -07:00
Ivan Avdeev
76b82ac884 rtx: calculate maxVertex correctly
after we've updated how brush index buffer references vertices to allow
for draw call coalescing ray tracing broke on amd.
this is because amd cards expect a correct value in
VkAccelerationStructureGeometryTrianglesDataKHR::maxVertex. make sure we
fill a correct value there.
2021-08-18 09:39:33 -07:00
Ivan Avdeev
93cab236ba split device enumeration and creation, fixes #28 2021-08-16 23:22:13 -07:00
Ivan 'provod' Avdeev
ee8e9d8ff7 concat brush drawcalls
make all geoms share the same constant vertex offset so that continuous indices can be exploited to generate only a single draw call for a group of geometries with the same texture
2021-08-15 11:30:38 -07:00
Ivan 'provod' Avdeev
a0a36f5a14 fix c89 2021-08-15 11:14:33 -07:00
Ivan 'provod' Avdeev
dc6b874cae restore debug labels for traditional renderer 2021-08-15 11:02:57 -07:00
Ivan Avdeev
ba761b370d
Merge pull request #27 from w23/aftermath-fix
fix building with aftermath
2021-08-14 19:00:19 -07:00
Ivan 'provod' Avdeev
fe0223c8d3 fix building with aftermath 2021-08-14 18:30:52 -07:00
Ivan Avdeev
5208219b44 join alloc+lock operations on buffer init
this simplifies the api and implementation
2021-08-11 11:43:33 -07:00
Ivan Avdeev
90e5500e83 add per-vertex studio model lighting
it doesn't correctly sample lightmaps for env lighting yet. we'll figure this out some time later ....
2021-08-07 19:56:38 -07:00
Ivan Avdeev
e6f8d8e47a enable anisotropy if available
also force require vulkan 1.2 for now, need to have 1.0 device for testing lower versions (TODO)
2021-08-07 18:06:48 -07:00
Ivan Avdeev
0028899eac rtx: add better hashes
from: Mark Jarzynski and Marc Olano, Hash Functions for GPU Rendering, Journal of Computer Graphics Techniques (JCGT), vol. 9, no. 3, 21-38, 2020
http://www.jcgt.org/published/0009/03/02/
2021-08-04 19:32:56 -07:00
Ivan Avdeev
378c1e52e0 enable anisotropy only for rtx
this doesn't make any visible impact for rtx rendering. but does affect non-rtx rendering when running with rtx enabled (kekw)
2021-08-04 18:56:11 -07:00
Ivan Avdeev
94ac51a527 rtx: sample mip levels based on ray cone width
this is mostly copied from ray tracing gems 2 chapter 7 (Texture Coordinate Gradients Estimation for Ray Cones, by Wessam Bahnassi).
There's a weird bit about radians vs degrees. We'll figure it out later when the book becomes available.
2021-08-04 18:36:53 -07:00
Ivan Avdeev
71bf85d4f8 fix mips generation 2021-08-04 17:44:21 -07:00
Ivan Avdeev
dbd5a7a2e4 add texture mipmaps
they're still corrupted a bit
2021-08-02 10:55:26 -07:00
Ivan Avdeev
074fdf84b4 update todo 2021-07-31 12:43:35 -07:00
Ivan Avdeev
fc2c7185df rtx: add basic transparency and reflections
this is very proof-of-concept quality. it should be definitely done some other way

e.g. we should control reflectivity and transparency differently (and not together)
and they should be based on texture ids, not on render_mode

it's also unfortunate that transparency required a lot of bounces. we should probably control transparency bounces separately from light bounces.
alternatively, transparency effects (beams, sprites) should be done with custom intersection shaders and not based on transparent geometry
2021-07-31 12:35:59 -07:00
Ivan Avdeev
1d94f5da00 rtx: fix c90 compilation errors 2021-07-17 12:40:26 -07:00
Ivan Avdeev
c2729c9d63 rtx: fix reflections; update todo 2021-07-17 12:37:12 -07:00
Ivan Avdeev
eeb83bd99f rtx: dont trace ray when there's no geometry
We used to dispatch rays anyway even if there was no models to render and tlas wasn't built (which is the case for the first few frames).
This ended up crashing AMD gpu when using some (but not all) variants of rgen shaders.

With this change we'll check for whether there are any models to render, and if there are none, then we'll just clear frame to black.

This change also refactors ray tracing a bit.
2021-07-17 11:45:28 -07:00
Ivan Avdeev
316e77df78 rtx: add alpha mask transparency 2021-07-14 11:54:21 -07:00
Ivan Avdeev
d7fc697de4 rtx: HACK: workaround for amd
for some reason amd will lose device whenever the first rendered frame has multiple push-constant-depndent bounces and break on line 138 in rgen.
when both break is commented out and bounces are compile-time constant, it will work just fine.
moreover, if we start xash with the workaround shader, get it to draw a few frames, and only then bring back both break and pc-bounces, recompile and reload shader, it will run just fine. not losing device and all.

wtf
2021-07-14 11:49:37 -07:00
Ivan Avdeev
59361f91cb rtx: remove old compute shader 2021-07-14 10:15:56 -07:00
Ivan Avdeev
4fa079b05a rtx: restore multiple bounces and dlights 2021-07-14 10:10:20 -07:00
Ivan Avdeev
38c636cad4 rtx: make freeman drunk again 2021-07-14 09:48:32 -07:00
Ivan Avdeev
04d92508ae rtx: bring back random sampling lights 2021-07-14 09:43:36 -07:00
Ivan Avdeev
caa284f835 rtx: add shadows 2021-07-12 10:59:52 -07:00
Ivan Avdeev
7d6ee9623b rtx: add lighting w/o shadows 2021-07-12 10:42:20 -07:00
Ivan Avdeev
d1fe897966 Merge remote-tracking branch 'origin/vulkan' into amd_ray_tracing_fixes 2021-07-12 09:45:26 -07:00
Ivan Avdeev
def7fac402 rtx: fixup build after merge 2021-07-12 09:23:50 -07:00
Ivan Avdeev
02da9652bf make vulkan deps conditional at configure time 2021-07-11 15:47:51 -07:00
Ivan Avdeev
76d381388b improve vulkan api definitions 2021-07-11 14:07:25 -07:00
Ivan Avdeev
64469b1a3d fix ci build 2021-07-10 12:42:47 -07:00
Ivan Avdeev
a46b0dffdc rtx: enable textures
- use non-uniform indexing because AMD requires it (which is technically correct by spec, it's just nvidia that supports it transparently)
- disable immutable samplers, as that breaks filtering on amd for some reason (TODO)
2021-07-10 12:37:14 -07:00
Ivan Avdeev
dd6fe33a16 add ghetto device selection, allow skipping first device
device selection should be performed by vulkan physical device index, but we have no way to read numeric cmdline arguments from xash
see #21
2021-07-10 11:34:59 -07:00
Ivan Avdeev
d66ee6b3ce rtx: fix hit/miss shader order
also move geometries offsets to ranges struct instead of adding offsets to buffers addresses
2021-07-10 11:06:55 -07:00
Ivan Avdeev
9623d6ef31 rtx: add stub closest hit and miss shaders to rt pipeline 2021-07-07 12:02:12 -07:00
Ivan Avdeev
2ca2e2058e fix compile warnings for CI, part 2 2021-07-06 12:54:45 -07:00
Ivan Avdeev
c51d593679 rtx: get ray tracing pipeline to draw at least something
on amd gpus it won't draw anything at all unless you have the entire ray tracing pipeline set up fully and correctly:
- have at least rgen, rmiss and rchit shaders
- set up shader groups to reference them
- set up sbt to reference shader groups
it is not enough to just have a single rgen shader operating like a compute shader. amd will have a shader preamble that checks for something and exit early w/o actually running any shader code you wrote

meh
2021-07-06 11:28:24 -07:00
Ivan Avdeev
56007bdb1d rtx: don't forget to destroy shaders 2021-07-06 09:42:16 -07:00
Ivan Avdeev
cdefb7a50a fix compiler warnings for CI 2021-07-06 09:41:48 -07:00
Ivan Avdeev
23697d75eb Merge branch 'vulkan' into amd_ray_tracing_fixes 2021-07-05 14:50:19 -07:00
Ivan Avdeev
364b46ea87 [WIP] rtx: first build with ray tracing pipeline and black screen 2021-07-05 13:24:57 -07:00
Ivan Avdeev
34359e2f75 rtx: start splitting ray tracing into functional modules
move model management into vk_ray_model
2021-07-05 10:59:14 -07:00
Ivan Avdeev
c662695056 rtx: add runtime toggle between ray tracing and traditional renderer
new command is `vk_rtx_toggle`
2021-07-04 13:17:03 -07:00
Ivan Avdeev
750d3b7608 rtx: fix brush models being invisible
An incorrect range of used vertices was pased into `VkAccelerationStructureGeometryTrianglesDataKHR`.
 `maxVertex` was being set to a count of vertices per geometry, not a maximum used vertex number.

The fix is to track `vertex_offset` of the first used vertex, which makes `maxVertex` correct.
2021-07-04 12:48:32 -07:00
Ivan Avdeev
2034acbe76 rtx: fix build_ranges incorrect pointer indirection 2021-07-04 12:05:21 -07:00
Ivan Avdeev
3ed4d84653 rtx: add runtime toggle between ray tracing and traditional renderer
new command is `vk_rtx_toggle`
2021-07-04 11:18:28 -07:00
Ivan Avdeev
20d38fead5 fix ISO C90 mixing declaration and code 2021-06-23 17:04:26 -04:00
Ivan Avdeev
20c42a7815 fix ISO C90 mixing declarations and code 2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
f2e90cc420 rtx: fix cached blas mismatched size assert, fixes #10
apparently we also need to track max primitives per blas
2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
e272539136 enable crude beams and sprites support back 2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
5211c33cce rtx: add shader specialization 2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
01cd55641b fix oob mem access when parsing rad files 2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
355ebd8d23 rtx: add reflections for water; add sky as emissive surfaces 2021-06-19 12:52:13 -07:00
Ivan 'provod' Avdeev
0356013db6 update todo; add more diags for rtx as handling 2021-06-19 10:51:21 -07:00
Ivan 'provod' Avdeev
8321dda9d9 rtx: fix water normals performance and culling 2021-06-19 13:44:28 -04:00
Ivan 'provod' Avdeev
4e599b4070 cull water side surfaces 2021-06-19 13:44:28 -04:00
Ivan 'provod' Avdeev
531fcd9393 move water warping to vk_brush 2021-06-19 13:44:28 -04:00
Ivan 'provod' Avdeev
74e0fb2947 add initial water surfaces
still need to cull them, generate normals, etc.
2021-06-19 13:44:28 -04:00
Ivan Avdeev
f8dc37b0eb 🤦 2021-06-07 12:21:47 -07:00
Ivan Avdeev
a004656b57 ref_vk: remove verbose ci info; fix win23 func ptr 2021-06-07 12:05:47 -07:00