Commit Graph

2012 Commits

Author SHA1 Message Date
Ivan Avdeev
4becafc02c Merge branch 'sample-emissive-lights-textures' into E177
Also do not multiply emissive textures by emissive color. similar to how
original lighting works.
qrad lighting treats emissive surfaces as constant color w/o paying
attention to texture contents. And then the rederer just draws textures
w/o lightmaps.

We need to figure out what to do with pbr path tracer.
2021-12-08 10:43:11 -08:00
Ivan Avdeev
e3e8693b13 rtx: attenuate lights based on solid angle, not distance and area, #145
breaks previous tuning
2021-12-05 13:38:16 -08:00
NightFox
de2a52dd71 Update ref_vk/vk_cvar.c
Co-authored-by: Ivan Avdeev <me@w23.ru>
2021-12-04 22:02:34 -08:00
NightFox
fb79c1937f Update text for disabled rtx 2021-12-04 22:02:34 -08:00
NightFox
8e0be3c372 add vk_rtx_extension cvar for rtx options, more smart vk_rtx cvar 2021-12-04 22:02:34 -08:00
NightFox
e3cbb785e2 Add FCVAR_READ_ONLY and unlock FCVAR_GLCONFIG (temporary solution for some commands) 2021-12-04 22:02:34 -08:00
NightFox
c6f92b0664 Add ClearBits for FBitSet
Because otherwise the condition will be called all the time.
2021-12-04 22:02:34 -08:00
Ivan Avdeev
3de2a98db4 rtx: fix skipping the last leaf when clustering lights, fix #97
apparently model_t->leafs goes from 1 to model_t->numleafs, not from 0
to model_t->numleafs-1
2021-12-03 11:37:10 -08:00
Valery Klachkov
3b6898f701 force rtx if supported card found, remove flag 2021-12-03 11:29:06 -08:00
NightFox
b81c5a4c4d switch submodule mainui to zgdump/mainui_cpp fork 2021-12-03 11:27:32 -08:00
NightFox
152748b657 fix error: implicit declaration of function 2021-12-03 11:26:50 -08:00
NightFox
f501f8255d add reload 2d pipeline 2021-12-03 11:26:50 -08:00
Ivan Avdeev
1dabdc67d6 sample emissive lights textures 2021-12-03 09:57:24 -08:00
Valery Klachkov
99f382429e Vulkan is the best of the renders!
Co-authored-by: Ivan Avdeev <me@w23.ru>
2021-12-01 22:19:45 -08:00
Valery Klachkov
4c14dfbd9f Add vk render to video modes 2021-12-01 22:19:45 -08:00
NightFox
fcb56ccb45 Update vk_materials.c 2021-12-01 19:14:40 -08:00
NightFox
b517205269 Add new locations for materials.mat
pbr/sprites/materials.mat
pbr/gfx/env/materials.mat
2021-12-01 19:14:40 -08:00
Ivan Avdeev
f70f5bfe82 rtx: add scalar parameters for material overrides, fix #238 2021-12-01 13:19:01 -08:00
Ivan Avdeev
0e0f1913a1 rtx: add scalar parameters for material overrides, fix #238 2021-12-01 10:32:32 -08:00
NightFox
5917fff727 Update ref_vk/vk_framectl.c
Okay

Co-authored-by: Ivan Avdeev <marflon@gmail.com>
2021-11-30 19:53:06 -08:00
NightFox
1bf72f6a1a Add vk_rtx command
For enable or disable ray tracing mode
2021-11-30 19:53:06 -08:00
NightFox
564359ffe2 Remove requirement -vkdebug for some console cmds
vk_rtx_reload
vk_rtx_reload_rad
vk_rtx_freeze
2021-11-30 19:53:06 -08:00
Ivan Avdeev
431cd79072 clear studio model vertex memory; #241 2021-11-29 21:32:52 -08:00
Ivan Avdeev
c833d0e320 rtx: make default light radius smaller, fix #242 2021-11-29 21:17:22 -08:00
Ivan Avdeev
93fba1018c fix incorrect surface indexing when patching
fix #239
2021-11-29 10:06:07 -08:00
Ivan Avdeev
2ebae2f4e1
Merge pull request #234 from w23/patch
fixes #117
2021-11-28 14:14:23 -08:00
Ivan Avdeev
5c85d1b648 rtx: add radius property for point/spot lights
it is not handled correctly in shader yet
2021-11-28 14:05:54 -08:00
Ivan Avdeev
39de6ad170 improve ui_unfotool crosshair alignment 2021-11-28 13:51:59 -08:00
Ivan Avdeev
ee52562e46 rtx: propagate patched emissive color 2021-11-28 13:51:30 -08:00
Ivan Avdeev
7ca6c2128c rtx: allow patching light entities
change light position and color example:
```
{
	"_xvk_ent_id" "217"
	"_light" "255 0 255 1000"
	"origin" "-2016 300 -432"
}
```

delete light example:
```
{
	"_xvk_ent_id" "219"
}
```
2021-11-28 13:38:01 -08:00
Ivan Avdeev
cd2804b659 attempt to read skybox images from pbr/env/<name>.png first, #155 2021-11-28 12:43:35 -08:00
Ivan Avdeev
5a7cb651ca rtx: allow patching emissive color for brush surfaces, #117 2021-11-28 11:15:02 -08:00
Ivan Avdeev
c4c97b2822 Merge branch 'vulkan' into patch 2021-11-28 09:56:25 -08:00
Ivan Avdeev
a394038f22 rtx: do not treat SURF_SKY as light source, fix #232 2021-11-27 20:22:32 -08:00
Ivan Avdeev
28d047a904 rtx: enable patching surface textures
example:
```
{
	"_xvk_surface_id" "489"
	"_xvk_texture" "#maps/test_material.bsp:debug_normal1.mip"
}
```

if _xvk_texture is empty, then the surface will be deleted

surfaces can be deleted or their
2021-11-26 23:59:48 -08:00
Ivan Avdeev
ecaac9d4c7
Merge pull request #222 from w23/E170
Streams 170-172.
- implements skybox, fixes #140 
- improves material reloading, fixes #207
2021-11-25 15:36:02 -08:00
Ivan Avdeev
c2748ff034 fix random crashes on map load
how about not freeing stuff and then trying to use it?
2021-11-25 15:08:16 -08:00
Ivan 'provod' Avdeev
f0aaa3cd10 materials: enable force-reloading textures
mark such materials as `"force_reload" "1"`
2021-11-25 14:38:03 -08:00
Ivan 'provod' Avdeev
1624f4620a mat: load materials from multiple sources; abs paths
- look for materials in:
  - pbr/materials.mat
  - pbr/models/materials.mat
  - pbr/wadname.wad/materials.mat
  - pbr/maps/mapname.bsp/materials.mat

- all paths are relative to their materials.mat, except for ones that begin with '/', which are relative to `pbr` dir

pbr dir should be placed in modname dir, e.g. 'valve'

#155
2021-11-25 13:51:39 -08:00
Ivan 'provod' Avdeev
405a9ecbb4 rtx: skybox srgb workaround for #230 2021-11-25 12:31:36 -08:00
Ivan 'provod' Avdeev
a9d5e4dd22 rtx: draw skybox on SURF_SKY surfaces only
- change how shadows for environment lights work: should cast light only when hitting SURF_SKY
- add SBT_RECORD_SIZE to specialization; need this for sky/shadow closest hit shader

fix #140
2021-11-25 11:53:44 -08:00
Ivan Avdeev
12565a35a1 reorient skyboxes to vulkan spec 2021-11-23 09:07:58 -08:00
Ivan Avdeev
9920dc6674 unload cubemaps 2021-11-23 09:07:21 -08:00
Ivan Avdeev
e094a67931 Add issues templates
Allow automatic label assignment from external reporters, fix #81
2021-11-21 23:23:48 -08:00
Ivan Avdeev
1ad13817fe add cubemap support; add misaligned skybox 2021-11-21 14:53:51 -08:00
Ivan Avdeev
714d825956 deduplicate creation of VkImages 2021-11-21 13:40:11 -08:00
Ivan Avdeev
dc3e75bd44 add skybox from which we only render UP plane kek #140 2021-11-19 11:46:44 -08:00
Ivan Avdeev
335be32cff rtx: fix additive when hitting sky 2021-11-19 11:46:44 -08:00
Ivan Avdeev
10dab2f021 fix materials application to studio models, fix #216
1. make sure that it can find studio textures by name exactly (no wad or
   other weird prefixes necessary)
2. do not apply HACK_reflective to chrome that already has a patched
   material
2021-11-19 11:46:44 -08:00
Ivan Avdeev
10c48e86b3 take tangent from bsp data directly, fix #218 2021-11-19 11:46:44 -08:00