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
1ad13817fe
add cubemap support; add misaligned skybox
2021-11-21 14:53:51 -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
6df830dd0a
add initial normalmaps support
2021-11-17 09:43:10 -08:00
Ivan 'provod' Avdeev
e8359b12e8
rtx: add material support stub
2021-11-16 09:34:36 -08:00
Ivan 'provod' Avdeev
25ed4598b4
rtx: slightly denoise specular (bad)
2021-11-12 10:43:14 -08:00
Ivan 'provod' Avdeev
499adafaed
rtx: pass normals to denoiser
2021-11-12 10:42:56 -08:00
Ivan 'provod' Avdeev
fdad4fa016
rtx: make denoiser kernel gaussian
2021-11-12 09:40:08 -08:00
Ivan 'provod' Avdeev
59a15a0580
rtx: do not kill bounces too early
...
fixes dark roughness blots
2021-11-12 09:13:03 -08:00
Ivan 'provod' Avdeev
87095c59da
Merge remote-tracking branch 'origin/vulkan' into E164
2021-11-12 08:28:46 -08:00
Anton Baskanov
c17a53c78f
Pass stationary UV coordinates to computeAnisotropicEllipseAxes.
...
The coordinates must match the ones in the uvs array. Fixes blur of
func_conveyor textures.
2021-11-10 00:12:23 -08:00
Anton Baskanov
593be43b58
Pass world positions to computeAnisotropicEllipseAxes().
...
Fixes #197 .
2021-11-10 00:12:23 -08:00
Ivan 'provod' Avdeev
a152fb8ac1
rtx: add specular and additive channels
2021-11-09 10:59:36 -08:00
Ivan 'provod' Avdeev
6f8bbb277b
rtx: split lighting into diffuse and specular components
2021-11-09 10:35:29 -08:00
Anton Baskanov
499559308d
Compute texcoord gradients with anisotropy.
...
Fixes #167 (this time for real :-)). The original function did not
account for anisotropy, so use code from a different paper.
2021-11-08 16:52:20 -08:00
Ivan 'provod' Avdeev
4cfe76dc40
rtx: split color into base and diffuseGI; add dumb denoiser
2021-11-07 13:49:44 -08:00
Ivan 'provod' Avdeev
0627c612c3
rtx: s/rgba8/rgba16f/ for color textures
2021-11-07 13:49:44 -08:00
Ivan 'provod' Avdeev
f570e59961
rtx: move upscaling back from denoiser
2021-11-07 13:49:44 -08:00
Ivan 'provod' Avdeev
c89dfee7b8
rtx: fix pre-denoise barriers, remove feedback from rgen
2021-11-07 13:49:44 -08:00
Ivan 'provod' Avdeev
3abd5ee259
BROKEN rtx: add denoiser compute stub
2021-11-07 13:49:44 -08:00
Ivan Avdeev
f14b01f195
rtx: add r_lightmap cvar, fix #75
2021-11-02 10:36:31 -07:00
Ivan Avdeev
54e549d726
add ACES tonemapping, fix #120
2021-11-02 10:36:31 -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
Ivan 'provod' Avdeev
5e50bdfcf2
rtx: add conveyor scrolling texture, fix #158
2021-10-27 22:48:26 -07:00
Ivan Avdeev
bb4dc5e2a1
rtx: bring back front face culling; update todo
2021-10-26 13:12:25 -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
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 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
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
Ivan Avdeev
72fcf52837
rtx: simplify toggling light clusters debug visualization in shader
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
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
53fd5b6b23
rtx: compute lighting in hl-native units, remap color in the end ( #98 )
2021-10-13 12:27:24 -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