Commit Graph

28 Commits

Author SHA1 Message Date
Ivan Avdeev a578becdd9 vk: rt: add diffuse and specular debug display modes
These will display diffuse and specular channels, both direct and
indirect, after spatial denoiser, but before temporal one.
2024-01-26 14:02:19 -05:00
Ivan Avdeev 579b9e00ac vk: rt: enable white furnace via new rt_debug_flags 2024-01-26 10:52:17 -05:00
Ivan Avdeev 6d58ad8df0 vk: rt: add white furnace debug display mode
Known issues:
- it doesn't really look how it's supposed to look
- using debug display mode for it was a mistake
2024-01-26 10:34:46 -05:00
Ivan Avdeev f157762043 vk: rt: pass r² to points lights from native 2024-01-15 11:40:17 -05:00
Ivan 'provod' Avdeev 3153a83621 vk: rt: add material debug display mode
Also add debug display modes info
2024-01-11 11:56:23 -05:00
Ivan 'provod' Avdeev dee067c771 vk: remove unused code 2024-01-08 13:29:52 -05:00
Ivan Avdeev e9b05ff849 vk: rt: add direct_{diff,spec} debug display
also try to simplify brdf ggx math
2024-01-02 13:32:49 -05:00
Ivan Avdeev bec1e0f558 vk: rt: add tunable skybox exposure
E.g. add `desert.mat` alongside `desert.ktx2` (or
`desrt_{rt,lf,...}.png` files) with the following contents:
```
exposure 0.3
```
Skybox texture color will be multiplied by this value.
2023-12-18 12:26:01 -05:00
Ivan Avdeev 605647aecc vk: rt: support changing screen resolution
Fixes #343
2023-11-30 13:01:40 -05:00
Ivan Avdeev bbd96b3e0e vk: consolidate all bindings to the top of shaders
That way it is more clear what we declare, why and how.
2023-11-23 12:25:24 -05:00
Ivan Avdeev 4def45125c vk: add `trihash` to `rt_debug_display_only` cvar 2023-11-16 10:55:05 -05:00
Ivan Avdeev 2c0e7033ed vk: fix crashing on maps with skybox
We were using a negative value for `SURF_SKY` surfaces, which hit an
assert on uploading kusochki.
2023-11-07 13:30:46 -05:00
Ivan Avdeev a25bf841ac vk: fix bright artifacts coming from unpatched chrome materials
Fixes a typo that rewrote roughness value with garbage.

Also adds a few more debug channel displays for lighting phases. And
prints out available debug displays.

Fixes #641
2023-11-06 12:47:21 -05:00
Ivan Avdeev 3a7d047f09 vk: add `surfhash` argument to `rt_debug_display_only`
Allows highlighting all the surfaces with random colors to easily see
the surfaces structure and boundaries.

Fixes #635
2023-11-03 12:05:36 -04:00
Ivan Avdeev 28eec97cbf vk: implement r_lightmap for both traditional and RT renderers
Display lightmap plus lighting for traditional.
Display all collected lights (including bounces and simple transparency)
for RT.

Fixes #634
2023-11-03 11:26:57 -04:00
Ivan Avdeev 0ba85e3f08 vk: add `rt_debug_display_only` cvar
Displays only the specified channel.

Fixes #631
2023-11-03 10:58:13 -04:00
Ivan Avdeev a1cae92a2c vk: textures: add blue noise textures
They are not used by anything yet.

Fallback to generating regular noise textures if bluenoise ones weren't
found.

Real blue noise textures require Half-Life-PBR repo textures.
2023-09-11 12:31:03 -04:00
Ivan Avdeev 0b8fe6fe33 rt: implement fast dynamic models
It works, and works really fast.
Known issues:
- missing colors
2023-06-07 10:24:29 -07:00
Ivan Avdeev edb151bd1b rt: apply instanced texture overrides to rt_model; makes sprites apply correct textures 2023-06-01 10:15:30 -07:00
Ivan Avdeev d24961db15 vk: add block allocator draft
The intent is to manage long-vs-single-frame allocations better.
Previously long allocations were map-long bump allocations, and couldn't be freed
mid-map, as there was neither a reference to the allocated range, nor a
way to actully free it.

Add a two-mode block allocator (similar to previous debuffer alloc) that
allows making long and once allocations. But now long allocations are
backed by "pool" allocator and return references to the range.

This commit doesn't do the deallocation yet, so map chaning doesn't yet
work.
2023-05-25 12:12:18 -07:00
Ivan 'provod' Avdeev 1cfb183cbd rt: extract per-model data from kusochki 2023-05-01 17:03:22 -07:00
Ivan 'provod' Avdeev d576818550 rt: implement mix blending with undefined order
Known issues:
- apparently BLEND_MIX surfaces should also participate in lighting. Figure out how.
- sensitive to ray tracing order. Need proper OIT (or hacks)
2023-04-27 10:59:38 -07:00
Ivan 'provod' Avdeev 1ebc1d207c rt: commoditize setting material mode
Known issues:
- Breaks sprite glow for some reason.
2023-04-27 10:59:38 -07:00
Ivan 'provod' Avdeev 5b370509fe rt: group Material and ModelMetadata in Kusok
They have mismatching frequencies. ModelMetadata should be per-Model, there should be only a few dozen of these.
There maybe hundreds (or even thousands) of materials, but one material can be still referenced by many kusochki.

This only moves fields into new structs, which still belong to Kusok. The real extraction will happen later, see #52.
2023-04-27 10:59:38 -07:00
Ivan Avdeev 41b033efbd vk: comment various material-related things
This is in preparation for #460
2023-04-21 23:34:27 -07:00
Ivan Avdeev 1fd9e49f63 vk: add normal_scale to materials 2023-04-12 11:57:07 -07:00
Ivan 'provod' Avdeev 59e8a8c4c3 rt: only overshoot additive for glow mode
Add another flag to kusochki for glow geometry.
Move flags to a new kusok.flags field.

Fixes #231 (or at least makes it not stand out too much)
2023-02-28 17:50:50 -08:00
Ivan Avdeev 053d26e870 move ref_vk to ref/vk 2023-02-16 10:30:31 -08:00