1404 Commits

Author SHA1 Message Date
yvt
28a283cc82 Merge branch 'master' into feat-vfog2 2021-04-10 21:39:52 +09:00
yvt
e4e38d85c0 fix(core): remove the exception specification of IStream::~IStream
The exception specification isn't really useful.

Fixes build failure on Windows + MSVC.
2021-04-10 12:09:01 +09:00
yvt
12364d4151 feat(draw): add r_scaleFilter
- 0: Nearest neighbor
 - 1: Bi-linear
 - 2: Bi-cubic
2021-04-10 00:12:18 +09:00
yvt
5e9835c0fa fix(draw): do not blit depth bits from a framebuffer lacking a depth attachment
Fixes the visual corruption of the level 3 water rendering after
live-editing `r_scale` cvar.
2021-04-09 23:11:35 +09:00
yvt
6ccd397681 Fix an issue causing the first frame to be corrupted 2021-04-09 20:49:39 +09:00
yvt
a27caab565 3D render scaling (r_scale) 2021-04-09 20:14:10 +09:00
yvt
d2b9a2defc feat(draw): use jittered sampling
Dithered sampling turned out to be insufficient to remove banding.
2021-04-09 19:45:10 +09:00
yvt
43c857b201 refactor(draw): store a long-lived instance of GLFogFilter2 in GLRenderer::fogFilter2 2021-03-04 01:20:49 +09:00
yvt
d2daa7537c Merge branch 'master' into feat-vfog2 2021-02-10 01:23:03 +09:00
yvt
b6f70c3619 perf(draw): lower the AO sample count and ray distance
This doesn't severely affect the output quality thanks to the denoising
pass.
2021-02-10 01:21:06 +09:00
yvt
95c73193d1 feat(draw): alleviate the AO blurring artifact on chunk boundaries 2021-02-10 00:55:07 +09:00
yvt
0d53d6fcc8 feat(draw): mitigate the AO under-shadowing by limiting the blurring from airborne voxels into by-surface voxels 2021-02-10 00:38:57 +09:00
yvt
1d23d22a44 Merge branch 'master' into feat-vfog2 2021-02-09 02:46:27 +09:00
yvt
62930e4d9e feat(draw): compensate for the under-shadowing caused by sampling AO terms away from surfaces 2021-02-09 02:45:13 +09:00
yvt
cc2c4c623b Merge branch 'master' into feat-vfog2 2021-02-08 23:13:33 +09:00
yvt
2e5cf93ab0 feat(draw): calculate the contribution of each factor (direct sunlight, ambient, radiosity) more physically-correctly 2021-02-08 23:12:11 +09:00
yvt
98da38e1da feat(draw): sample the pre-computed AO at the center, not the corner, of each voxel 2021-02-08 22:14:28 +09:00
yvt
2d232da163 feat(draw): do not blur the pre-computed AO across walls 2021-02-08 21:23:12 +09:00
yvt
ed73991abf feat(draw): raise the AO quality 2021-02-08 20:38:58 +09:00
yvt
a517f5aefc feat(draw): do not require r_temporalAA to use r_fogShadow 2
I thought it would look bad without `r_temporalAA`. It wasn't that bad,
actually.
2021-01-29 19:45:56 +09:00
yvt
20a4972237 refactor(draw): use a preprocessor definition to pass USE_RADIOSITY to shaders 2021-01-29 19:22:23 +09:00
yvt
9a0f4d0f9a feat(draw): do not turn off GLFogFilter* when the fog color is pitch black
`GLFogFilter2` applies GI, so it does something even if the fog color
is black.
2021-01-29 19:17:45 +09:00
yvt
86f2e8630e feat(draw): take the fog GI into consideration when applying the sharpening effect 2021-01-29 19:16:43 +09:00
yvt
cdc8bf9546 feat(draw): apply GI to GLFogFilter2
It's incredibly beautiful and slow.
2021-01-29 18:42:48 +09:00
yvt
1e87f8e81e feat(draw): implement dithered sampling
The result is ...meh. Maybe we should switch to bi-lateral filtering?
2021-01-29 18:15:24 +09:00
yvt
d5152eda48 feat(draw): gate GLFogFilter2 by r_radiosity and r_temporalAA
I intend the volumetric fog to receive GI. To simplify the
implementation, I decided not to support other cases.

I'd like to exploit temporal AA to reduce the sample count per pixel
by dithered sampling. It would perplex the users if the unfiltered
dither pattern was visible because temporal AA was turned off.
2021-01-29 17:39:22 +09:00
yvt
58899175af feat(draw): remove the existing ray marching code, refactor the ray determination by using a projection matrix 2021-01-29 17:32:58 +09:00
yvt
c17cad7422 feat(draw): use GLFogFilter2 for real 2021-01-29 17:16:27 +09:00
yvt
e2986217d6 feat(draw): disable coarse sampling in GLFogFilter2 2021-01-29 16:46:14 +09:00
yvt
6cbd347f4f feat(draw): add GLFogFilter2, which is activated by r_fogShadow 2 2021-01-29 16:36:50 +09:00
yvt
a3138dcc1a feat(draw): increase the sharpening amount if temporal AA is enabled 2021-01-23 15:14:20 +09:00
yvt
fc34c60f42 feat(draw): increase the blur kernel radius for the sharpening effect 2021-01-17 23:43:03 +09:00
yvt
a26a9c7a26 feat(draw): apply sharpening effect during the color correction pass
This effect frags two deuces with one grenade. Firstly, it enhances the
image's clarify for aesthetic reasons. Secondly, it offsets OpenSpades'
fog density, which is often claimed to be denser than the original
client. Technically, the fog density function is mostly identical
between these two clients. However, OpenSpades applies the fog color in
the linear color space, which is physically accurate but has tendency to
strengthen the effect because the human light perception is logarithmic.

The effect amount can be adjusted by `r_sharpen` config variable.
2021-01-17 23:43:03 +09:00
yvt
ae12df59cc feat(draw): apply the temporal AA pass after the lens dust filter
The lens dust filter adds a film grain, which would lower the neighbor
clamping technique's effectiveness if applied first.
2021-01-17 23:42:36 +09:00
yvt
debf3aa8b0 feat(draw): improve the numerical precision of the reprojection matrix calculation 2021-01-17 22:36:36 +09:00
yvt
26faf05d92 feat(draw): take camera translation into account for reprojection 2021-01-17 22:27:05 +09:00
yvt
4da14fced2 feat(draw): make the motion blur amount adjustable 2021-01-17 00:36:16 +09:00
yvt
6b54ce0cb5
Merge pull request #936 from yvt/feat-taa
Temporal antialiasing
2021-01-16 23:50:59 +09:00
David CARLIER
457b9eba38
Little step further to fix M1 build. (#937)
opusfile native for ARM is existing.
Angelscript needs update to have ARM64 calling convention.
2021-01-13 14:38:33 +09:00
yvt
fb7004a3a5 Remove an unused function 2021-01-08 21:31:30 +09:00
yvt
31dbe3649d Implement temporal AA
Fixes #597.

Currently, reprojection is done by taking only the camera rotation into
account. The result is not very satisfactory.
2021-01-08 21:28:19 +09:00
yvt
c073c92c6a fix(client): don't pass nullptr to std::nan, don't use std::nan at all
`std::nan` converts a given string to a quiet NaN value in an
implementation-defined way. It accepts an empty string, but that doesn't
mean you can pass `nullptr`. Passing `nullptr` causes a segmentation
fault on Linux but does not on macOS, which I think is why I missed that
in the first place.

Actually, `std::nan` isn't even really needed here, hence I replaced it
with `NAN`.
2021-01-05 16:22:17 +09:00
yvt
684753ab27 chore(cmake): rename the executable to OpenSpades.exe on Windows 2020-12-18 05:56:44 -08:00
yvt
4d078e7376
Merge pull request #924 from yvt/patch-vcpkg
Adopt vcpkg and streamline the build process
2020-12-18 22:15:55 +09:00
yvt
9b7673d8d2 chore: get rid of Sources/Externals
We don't need it anymore since we now use vcpkg to fetch dependencies.
2020-12-18 04:54:27 -08:00
yvt
4aef2bbef8 Play hit sounds only once per attack
Fixes #925.
2020-12-17 00:59:09 +09:00
yvt
cb5f0d9284
fix: remove any remaining references to cg_smp
Fixes #923.
2020-12-17 00:39:23 +09:00
yvt
cdf2bcd9a5
chore: download libysrspades.dylib automatically when building for macOS 2020-12-14 00:14:13 +09:00
yvt
e9cd690a71
chore: build macOS app bundle 2020-12-14 00:02:47 +09:00
David Carlier
321c7ad2c6 Content class little code simplification. 2020-09-21 10:19:36 +01:00