Commit Graph

327 Commits

Author SHA1 Message Date
Ivan Avdeev
eceb52cee0 add support for studio chrome meshes, fix #149
no support for glow chrome yet.
2021-10-31 17:27:22 -07:00
Ivan 'provod' Avdeev
ef15ba5e08 rtx: fix scrolling textures for additive, fix #178 2021-10-31 17:27:22 -07:00
Ivan 'provod' Avdeev
24a07499c5 rtx: implement soft particles for additve, fix #177 2021-10-31 17:27:22 -07:00
Ivan 'provod' Avdeev
a8313073d3 rtx: add refractions support, fix #181
Decide whether the ray goes through or reflects based on brdf/fresnel.
Specular always reflects. Diffuse mode chooses between reflecting (GI) and continuing through (refraction). The decision is stochastical with probability being alpha channel (color * texture). Alpha = 0 => full refraction. Alpha = 1 => full reflection.

Lighting is not computed for refractive decision. (not sure if this is fully correct though).

It doesn't look correct all of the time.
Probably we need to split base_color into different channels fo diffuse/lighting and transmissiveness.
2021-10-31 17:27:22 -07:00
Ivan 'provod' Avdeev
3f12a42432 rtx: fix translucent things casting shadows (they shouldn't for now) 2021-10-31 17:27:22 -07:00
Ivan 'provod' Avdeev
b3465ceb30 rtx: implement additive translucency
fix #170
2021-10-29 12:48:36 -07:00
Ivan 'provod' Avdeev
1c6753d605 rtx: improve payload references between shader stages 2021-10-29 12:48:36 -07:00
Ivan 'provod' Avdeev
b7e6581e29 rtx: improve shader binding indexing 2021-10-29 12:48:36 -07:00
Ivan 'provod' Avdeev
24f11bccc7 rtx: add material mode enum, precursor for proper translucency handling
#173
2021-10-29 12:48:36 -07:00
NightFox
29e8cce207 fix #80
thanks zgdump
2021-10-27 23:10:08 -07:00
Ivan 'provod' Avdeev
5e50bdfcf2 rtx: add conveyor scrolling texture, fix #158 2021-10-27 22:48:26 -07:00
NightFox
0e345ded71 Tuned hack_attenuation default_radius values
More correct lighting
2021-10-26 22:44:21 -07:00
Ivan Avdeev
bb4dc5e2a1 rtx: bring back front face culling; update todo 2021-10-26 13:12:25 -07:00
Ivan Avdeev
4f903bd1d6 rtx: add lightstyles support, fix #138 2021-10-26 13:12:25 -07:00
Ivan Avdeev
54a777f0fd rtx: fix env light target direction, fix #128 2021-10-26 13:12:25 -07:00
Ivan 'provod' Avdeev
dd3f47ea4c fix windows build 2021-10-25 10:17:49 -07:00
Ivan Avdeev
e0d0e6393d rtx: add target support for spotlights, fix #128 2021-10-25 10:17:49 -07:00
Ivan Avdeev
539c04cbd1 move map entity parsing into vk_mapents, fix #134 2021-10-25 10:17:49 -07:00
Ivan Avdeev
2687dcde6b throttle dynamic geometry slots message, #133 #132 2021-10-25 10:17:49 -07:00
Ivan Avdeev
df7c2524a7 throttle some error messages, fix #133 2021-10-25 10:17:49 -07:00
Ivan Avdeev
b7983a2903 fix linux build 2021-10-25 10:17:49 -07:00
Ivan 'provod' Avdeev
4d78c44ed6 rtx: collect static surface lights only once on map load, fix #122
also fix buffer overflow on >255 lights
2021-10-25 10:17:49 -07:00
Ivan 'provod' Avdeev
452ca9de45 rtx: collect static light sources only once on map load, #122
this also breaks static surface lights
2021-10-25 10:17:49 -07:00
Ivan Avdeev
26caa39488 rtx: fix missing emissive textures, fix #129
Try to match textures from all wads referenced in worldspawn.wad.
2021-10-22 10:49:51 -07:00
Ivan Avdeev
7bbf1ea94d rtx: add single envlight to all clusters, fix #130
If there's only one environment light, HLRAD will treat is as global sun
that enlights everything. So we should add it to all light clusters,
and so we do.
2021-10-22 10:49:51 -07:00
Ivan Avdeev
93a29ecc1d rtx: only dump lights on command 2021-10-22 10:49:51 -07:00
Ivan Avdeev
49ce8423d0 fix linux build 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
94ce06d674 rtx: support environment lights, fix #16 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
2ab07547fa rtx: point/stop light clusters culling 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
c1f93ffc54 rtx: do not divide RGB lights by 255, fix #116 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
dcd5ff959c rtx: do not perform very expensive ray model memory validation 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
da41a09e9d make light collection debug log less verbose 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
c82cf03056 rtx: increase entity light limit 2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
debf9bd2e6 make profiler work on windows 2021-10-20 11:58:53 -07:00
Ivan Avdeev
084e35b3fd rtx: get rid of unnecessary sqrt 2021-10-20 11:58:53 -07:00
Ivan Avdeev
c5f370bbd2 rtx: slightly improve light cluster building perf
do not check light cluster more than once
do not check that surface has already been added (it can't)
2021-10-20 11:58:53 -07:00
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