Commit graph

220 commits

Author SHA1 Message Date
myT
1544a61cfc added waitms 2022-04-12 04:18:32 +02:00
myT
9e445bc284 fixed vertex lighting applying to non-lightmapped surfaces 2022-04-12 04:12:38 +02:00
myT
51863892f0 no longer denying looping sounds
this is mostly undoing e50a60fe17
and warning when delayed loads happen in quick succession

with this change:
- we no longer block legit looping sounds like the RG hum
- we only warn when there are too many loads instead of spamming for legit stuff
2022-04-11 00:40:27 +02:00
myT
dbfb3c5028 fixed delayed shader loads leading to incorrect rendering and crashes (dynamic lights) 2022-04-10 22:14:19 +02:00
myT
fa1cee73e0 fixed CL_NextDemo not being called after a drop error or fopen failing 2022-04-09 03:50:16 +02:00
myT
7923a0a94e fixed a Linux/FreeBSD start-up crash 2022-04-08 21:29:19 +02:00
myT
c534ed8048 fixed the alpha channel blend factors in the D3D11 backend 2020-11-06 02:48:55 +01:00
myT
3e0f5b2760 fixed RB_CalcTurbulentTexCoords by using the correct vertex offset
it got broken with db4fb31658
2020-10-27 00:30:13 +01:00
myT
55ed0e80af r_lightmap 1 now handles most alpha-tested surfaces 2020-10-20 01:55:53 +02:00
myT
e50a60fe17 sound loads during gameplay print warnings and get denied for looping sounds 2020-10-15 05:07:55 +02:00
myT
bb9e814837 throwing a fatal error when com_soundMegs is too low for a map load 2020-10-15 05:04:01 +02:00
myT
a4397252c3 com_soundMegs now defaults to 16 2020-10-15 04:48:41 +02:00
myT
ad2d3386a6 D3D11 now does depth clipping and the near clip plane distance is now 1 2020-10-11 18:24:35 +02:00
myT
e0b04b55c3 cl_aviFrameRate now defaults to 60 2020-10-09 04:57:02 +02:00
myT
0af1422190 Windows audio output device sampling rate is now 44.1 kHz 2020-10-09 04:51:21 +02:00
myT
8adf87e7c7 fixed .avi files starting with silence when not first in the sequence 2020-10-09 04:28:37 +02:00
myT
78cf275a62 fixed depth fade with MSAA in the GL3 backend 2020-10-08 03:55:40 +02:00
myT
427172edcf fixed D3D11 device resets being sometimes treated as fatal errors
after getting DXGI_ERROR_DEVICE_REMOVED or D3DDDIERR_DEVICEREMOVED,
GetDeviceRemovedReason can return DXGI_ERROR_DEVICE_RESET
this particular case should trigger a video restart instead of a fatal error
2020-07-07 09:07:53 +02:00
myT
a5c820644a CVar slots that have been freed can now be allocated again 2020-07-07 04:25:21 +02:00
myT
7412c4b373 added r_alphaToCoverageMipBoost and did some other changes to A2C
- r_alphaToCoverageMipBoost scales the alpha value based on the current texture LoD
  this prevents the "fading with distance" effect
- mip 0 dimensions are tested to decide whether contrast boosting around 0.5 is enabled
  this is to deal with high r_picmip configs
- improved algorithm for excellent sharpness and minimized temporal artefacts
- GLSL 4.00 is required for the GL3 backend to use A2C (for textureQueryLod)
2020-07-07 03:49:52 +02:00
myT
70ba2e7939 fixed and improved GL3 shader uniforms caching 2020-06-20 02:28:55 +02:00
myT
6fcabd83b7 fixed D3D11 partial render target clears
viewport/scissor settings do NOT apply to:
- ClearDepthStencilView
- ClearRenderTargetView

hence this fix
2020-06-18 04:19:34 +02:00
myT
05d92ab6f0 1.52 release 2020-06-01 21:08:56 +02:00
myT
d6f77a9b35 fixed crashes due to render command list overflows
also increased the buffer's size (e.g. to draw all chars in the console in 4K)

one of the crashes happens in R_SortDrawSurfs:
-> render command list is too full
-> RE_EndFrame returns early because it can't allocate RC_SWAP_BUFFERS
-> R_ClearFrame in RE_EndFrame doesn't get called
-> the next frame starts with r_firstSceneDrawSurf etc. not being reset to 0
-> r_firstSceneDrawSurf becomes really close to the maximum draw surface limit
-> the draw surface list is iterated incorrectly (no wrapping handled)
-> we fetch a draw surface we shouldn't
-> its sort key gets decoded and we get an invalid sorted shader index
-> we fetch a NULL shader at that index location
-> we attempt to read shader->sort
-> we crash reading address 76
-> 76 bytes is exactly the offset of the sort member into the shader_t struct
2020-05-08 03:38:26 +02:00
myT
1cf28d87fe r_speeds is no longer cheat-protected 2020-04-28 17:20:02 +02:00
myT
1994475982 renamed r_noiseScale to r_ditherStrength for consistency 2020-04-28 17:04:43 +02:00
myT
718b966414 depth fade fixes and improvements
- renamed r_softSprites to r_depthFade
  the term's more descriptive and it helps that UE4 uses it
- fixed the GL3 fragment shader halving the depth bias
- fixed the D3D11 pixel shader only fetching depth sample 0
  not fixed for GL3 yet, see the code comments for that
- added support for more blend states
- added the q3map_cnq3_depthFade general shader directive
2020-04-26 16:32:51 +02:00
myT
a5e28eb08f added r_transpSort and we can now sort all surface types by depth
also fixed up RE_AddPolyToScene's overflow check
2020-04-16 05:01:48 +02:00
myT
0fcd462244 improved the map download initiation logic and updated the CNQ3 map server addresses 2020-04-06 03:46:14 +02:00
myT
a5b6ee33da made more keys bindable on Linux/FreeBSD and /bind now accepts uppercase hex digits 2020-04-04 03:20:03 +02:00
myT
d5984db690 removed r_nobind and r_showImages, wrote help etc. for the renderer's other temp/cheat CVars 2020-04-02 05:06:00 +02:00
myT
9e061c4aff increased the small zone's size 2020-03-30 03:55:21 +02:00
myT
89aca4069e now fixing up the CVar hash table in Cvar_Nuke 2020-03-30 03:09:25 +02:00
myT
ae30c5a311 r_mapBrightness can now be used with r_fullbright for lightmapped surfaces 2020-02-27 05:26:19 +01:00
myT
69d6cdf42b fixed r_detailTextures 0 messing up shaders 2020-02-27 05:22:06 +01:00
myT
f773d2a783 fixed dynamic light face culling using the untransformed (world-space) light position 2020-02-26 23:01:28 +01:00
myT
36f363b47a D3D11 tweaks, added r_d3d11_presentMode, removed r_d3d11_maxQueuedFrames
the D3D11 tweaks:
- better error message formatting
- D3DDDIERR_DEVICEREMOVED from Present is a fatal error too
- synchronized offsets is always the automatic behavior for now
  it turns out that split mode isn't always the fastest for nVidia
2020-02-24 01:48:43 +01:00
myT
85583acc9c dynamic lights apply to even more surfaces and have a nicer fall-off
- ditched vertex colors (not wanted) and alpha tests (not needed) in the shaders
- using a Bezier fall-off to get much softer edges
- added no-depth-write transparent surfaces support by adjusting the depth test
- multiplying the diffuse texture's color by its alpha in non-opaque passes
- fixed triangle rejection based on cull type and normal direction
- reflecting normals in shaders to support two-sided surfaces
- rejecting surfaces with no diffuse stage or bad blend states as early as possible
- liquids get lit weaker than other surfaces
2020-02-21 08:26:12 +01:00
myT
8ef496d22b reverting to old code for .tga image decoding, but with tweaks and fixes
the problem is that stb_image can and will allocate much more than it needs to
e.g. for a 2048x2048 BGR image:
it allocates an unnecessary intermediate 12 MB buffer to decode the image
instead of decoding it directly into the final 16 MB RGBA buffer

the old CNQ3 code didn't decode greyscale properly because of a missing macro call
it also didn't range-check memory accesses at all
2020-02-18 04:42:28 +01:00
myT
8a1d1c539b Escape down in cgame triggers CG_EVENT_HANDLING again instead of CG_KEY_EVENT
with that, CPMA demo playback and /protect work as intended again
2020-02-09 04:25:31 +01:00
myT
01ce4063b5 added r_lightmapGreyscale
thanks to Jakub 'kubaxvx' Matraszek for his contribution
2020-01-12 23:03:54 +01:00
myT
e91f6e1c08 re-added r_textureMode to keep GL_NEAREST compatibility 2020-01-12 23:03:41 +01:00
myT
7d526ba6fc added FreeBSD support 2020-01-06 01:04:16 +01:00
myT
9cb02a32bf searching for valid sample counts for MSAA in GL2 and GL3 instead of failing 2019-12-26 16:24:22 +01:00
myT
a89a2e3ead MSAA centroid interpolation mode for GL3 and D3D11 to prevent artifacts
this helps mostly to avoid lightmap tile leaks with MSAA
2019-12-26 16:20:41 +01:00
myT
554d80ba64 mentioned the r_dynamiclight 1 r_lightmap 1 fix in the changelog 2019-11-12 04:32:58 +01:00
myT
c024cdcdc9 fixed a crash due to lack of memory for the sound system 2019-09-25 05:59:17 +02:00
myT
7939488266 fixed incorrect state bits for shaders when loading a map with no lighting 2019-09-25 05:35:45 +02:00
myT
0087c2bf14 fixed fog-only shaders being recognized as sky shaders 2019-09-25 05:34:22 +02:00
myT
8ee79c7b9e added r_rtColorFormat to select the color format for render targets
fixed FindBestAvailableAA not testing the depth/stencil format
2019-09-25 05:31:55 +02:00
myT
c5192d49b7 using the roundss SSE4.1 instruction for inlining floor and ceil syscalls when possible
fixed sharedTraps_t listing syscalls that were not actually at the same index for all 3 VMs
2019-09-25 05:29:36 +02:00
myT
1115cb39b0 added pattern matching filtering to /modellist /skinlist /imagelist /shaderlist 2019-09-25 05:29:13 +02:00
myT
db4fb31658 added OpenGL 3.2 and Direct3D 11 renderer back-ends 2019-09-25 05:25:59 +02:00
myT
6f3908ceaa completely removed flare support 2019-09-25 05:21:01 +02:00
myT
983b53cbbb SSE2 instruction set support is now required 2019-09-25 05:14:36 +02:00
myT
39af360fdc removed FreeType and the R_REGISTERFONT syscalls 2019-09-25 05:14:07 +02:00
myT
c44b13ad90 when faces have short normals, we compute new unit-length normals 2019-09-25 05:13:39 +02:00
myT
2d806401eb setting a cvar back to its default frees the latched string 2019-09-25 05:12:05 +02:00
myT
30c8990d6b fixed sdl_UpdateMonitorIndexFromWindow
made r_monitor 0-based on Linux
the concept of primary monitor isn't universal on Linux
2019-09-25 05:11:01 +02:00
myT
5e4d41df8e 1.51 release 2019-03-31 01:05:03 +01:00
myT
baa6eb2cc4 added .shader to the pure client file read exception list 2019-03-29 23:34:37 +01:00
myT
08b5d6bf57 r_lodCurveError is now archived and no longer cheat-protected
the new default also looks a lot less terrible
2019-03-28 22:10:22 +01:00
myT
e5e9bd8d28 fixed shader stage collapsing happening in cases where it shouldn't 2019-03-19 17:50:32 +01:00
myT
b089166978 now showing the cvar's current value in the help panel 2019-02-21 17:15:55 +01:00
myT
c75caeb98e added control/shift + left/right arrow field navigation 2019-02-21 17:14:45 +01:00
myT
b3456d0a10 added the ctrl-i and ctrl-d console shortcuts 2019-02-21 17:11:29 +01:00
myT
3305c6f515 improved multi-monitor support
- /monitorlist
- the monitor list gets updated during video restarts and by /monitorlist
- Linux > r_monitor is now 0-based and monitors are sorted top-to-bottom, left-to-right
- Windows > the Windows + shift + left/right arrow key shortcuts should be ok to use
2019-02-20 20:52:34 +01:00
myT
26ccc528d1 map download improvements
- numeric addresses as fallbacks
- non-blocking connections
- writing to $(fs_homepath)/baseq3 instead of $(fs_basepath)/baseq3
- only using valid (TCP/stream) addresses from getaddrinfo
- setting send time-outs
- ensuring the destination directory exists
- the renderer no longer messes up the RNG seed
2019-02-14 04:22:45 +01:00
myT
b909f05195 bundling lightmap tiles into texture atlases to improve batching 2018-12-08 23:36:27 +01:00
myT
a26b150c59 faster map loads by limiting the rendering back-end's frame-rate 2018-12-08 22:43:58 +01:00
myT
51cda86421 added the trap_IsRecordingDemo syscall for CPMA 1.52+ 2018-12-08 00:55:21 +01:00
myT
2f70685fa3 fixed bitstream string parsing not reading the last byte of max length strings ("q3msgboom") 2018-12-08 00:24:51 +01:00
myT
55ae7645b1 fixed demo playback abortion crashing when the "nextdemo" cvar was set to play a demo
also no longer breaking when stopping demo playback because it's annoying as hell
2018-12-08 00:13:45 +01:00
myT
4a848e7b6a no longer feeding cs commands that came from a previous gamestate to cgame 2018-12-08 00:03:26 +01:00
myT
8ecb5683d1 raised the upper limit of open stdio file handles from 512 to 2048 on Windows 2018-12-07 22:18:17 +01:00
myT
3620da42e4 fixed mouse cursor clipping on Windows 2018-12-07 21:28:22 +01:00
myT
a49512abde fixed requesting 4 samples instead of r_msaa samples 2018-10-05 14:03:02 +02:00
myT
1370e44ae5 added /cvar_add and /cvar_mul 2018-10-05 13:30:20 +02:00
myT
5972f247b1 fixed a bunch of /video and /stopvideo issues
chg: /video can only be used during demo playback
fix: broken audio in the output files due to writing the wrong buffer
fix: files sequences have a "_%3d" name suffix of adding an underscore to the extension
fix: using a better supported video codec (FourCC 0x00000000) for raw BGR output
fix: broken raw video output when r_width wasn't a multiple of 4
fix: /stopvideo no longer leaves sound output broken for a while after stopping
2018-09-29 08:22:47 +02:00
myT
a9e7bc7226 fixed cv/callvote completion handlers getting removed at cg shutdown and never added back 2018-09-26 05:28:40 +02:00
myT
067ae10ab5 added /unset, /setempty and sequence support to /toggle 2018-06-03 20:54:45 +02:00
myT
2fc0a06ef1 finalized the release date 2018-02-12 22:08:11 +01:00
myT
2e3f12c9a2 fixed long pk3 entry names causing crashes
when an entry was broken, pack_t::buildBuffer and fs_packFiles would end up wrong
2018-02-08 02:44:03 +01:00
myT
6cafc76e87 the client executable will now write to q3config.cfg on exit 2018-02-07 06:22:44 +01:00
myT
f34c8b5001 fixed demo playback that broke because of incorrect tokenizer usage
the breaking commit: c512071f2d
fixed using /demo when running a listen server (would load map and then abort)
2018-02-02 01:15:18 +01:00
myT
e4e68a971c no longer making local copies of all CS_SYSTEMINFO server cvars
this avoids undesired local changes to sv_pure etc
2018-01-29 20:46:39 +01:00
myT
c512071f2d updating the FS on client disconnects 2018-01-29 20:28:37 +01:00
myT
d3d4746a6b fixed the condump path argument truncation 2018-01-28 03:45:35 +01:00
myT
f9cfe48d11 can now pass "/crashreport:yes" and "/crashreport:no" to the Windows executables
this will disable the use of message boxes and won't open the crash report directory
2018-01-25 07:25:26 +01:00
myT
ac4928e18d reworked and unified sleeping
reduced client update rate when minimized
fixed timedemo playback
2018-01-25 06:41:30 +01:00
myT
4b99ff0cc5 added the fs_restart command 2018-01-25 05:29:53 +01:00
myT
5ea79f073c re-ordering the pak list when connected to a pure server
this fixes pure listen servers allowing unpure overrides for the owner
2018-01-25 05:25:57 +01:00
myT
b4b3482fd2 lifted the directory scanning restriction that affected pure listen servers 2018-01-25 05:11:33 +01:00
myT
ce46cebce0 during id pak downloads, the time-out is 5 seconds instead of cl_timeout 2018-01-25 04:49:33 +01:00
myT
543a024917 fixed waiting for a snapshot forever when the server disconnects during client connection 2018-01-25 04:36:13 +01:00
myT
3e3c1b2431 the "nextdemo" cvar is now also used when playback stops before reaching the demo's end 2018-01-24 02:19:57 +01:00
myT
eaa376a292 fixed demo playback crashing when delta entities/players had an invalid field count 2018-01-24 01:41:30 +01:00
myT
4fcf0f410e fixed some botlib strcpy calls with overlapping buffers (UB as per the specs) 2018-01-21 17:29:22 +01:00
myT
4a7f2356ab mouse motion is no longer forwarded to the mod when the console is down 2018-01-21 17:27:59 +01:00
myT
b7a76b6428 console down with 2+ screens always disables input grabbing 2018-01-21 17:26:18 +01:00