Commit graph

49 commits

Author SHA1 Message Date
myT
866b93ef5e turned r_showtris and r_shownormals into bitmasks 2022-04-29 21:12:01 +02:00
myT
4670a811c1 added r_ignoreShaderSortKey as a work-around for broken maps 2022-04-24 22:44:25 +02:00
myT
8c32b986f6 added r_mapGreyscale and r_mapGreyscaleCTF 2022-04-23 23:38:06 +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
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
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
546296e6ef fixed r_showsky and cleaned up the related GAL code 2020-04-02 04:50:12 +02:00
myT
7b01f8b8d3 fixed a bunch of variable shadowing cases and removed unused variables 2020-02-24 01:52:29 +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
ca9757082f r_colorMipLevels disables MSAA when centroid sampling would be used
this is because it would draw (parts of) geometric edges with different colors and that makes visual inspections annoying
also, final MSAA sample counts are always reported by GL3 and GL2 now
2020-02-05 03:43:19 +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
9cb02a32bf searching for valid sample counts for MSAA in GL2 and GL3 instead of failing 2019-12-26 16:24:22 +01: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
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
39af360fdc removed FreeType and the R_REGISTERFONT syscalls 2019-09-25 05:14:07 +02: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
a26b150c59 faster map loads by limiting the rendering back-end's frame-rate 2018-12-08 22:43:58 +01: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
515ca0883e minimizing disables the rendering back-end except for videos/screenshots
when minimized, we call the rest of the logic all the same (including the VM calls)
only 1 screenshot command can be issued per frame (i.e. only first one is kept)
2018-01-07 00:03:42 +01:00
myT
3b4338db2e fixed range/default for con_notifytime and r_lodbias 2018-01-04 19:51:29 +01:00
myT
53d93b1af0 new default values
sv_pure 0 for clients - 1 is annoyingly restrictive for a client
s_volume 0.2 - it was so damn loud
com_hunkMegs 128 for clients - to cope with "big" maps
r_msaa 0 - too many players still gaming with toasters
r_gamma 1.2
2017-12-27 07:33:59 +01:00
myT
3c52752dd3 added help panel and colorized help text
added con_drawHelp and con_col*
letting the mod know we support the "cap_ExtraColorCodes" extension
con_colText overrides ^7 in the console and the help panel
extended console back scroll arrows all the way
2017-12-27 05:13:33 +01:00
myT
4a296b3361 fixed a memory overflow due to GL_PACK_ALIGNMENT not being set correctly 2017-12-12 22:08:12 +01:00
myT
3c4a71faaf removed the stupid r_mapBrightness subtraction system 2017-11-29 14:20:53 +01:00
myT
9b60bd762d replaced r_(map)OverBrightBits with r_(map)Brightness 2017-11-22 18:59:51 +01:00
myT
964879bc5e changed r_mode and added r_blitMode 2017-11-22 18:26:26 +01:00
myT
e26163aa79 added screenshotnc and screenshotncJPEG 2017-11-05 22:40:32 +01:00
myT
c60d47e93f cleaned up tr_gl2.cpp and prefixes in win32 code
tr_gl2.cpp now uses the proper interface for printing errors
tr_gl2.cpp now has function names that make sense
removed old references to GLimp_*
cleaned up prefixes in the Windows platform layer
2017-11-03 19:35:35 +01:00
myT
9362d9bf53 deleted 2-threads rendering support (SMP) 2017-11-03 19:34:32 +01:00
myT
4cd544217c platform layer GL interface cleanup
renamed and documented the core GLimp functions
moved the memset calls out of GLimp_Shutdown
dealing with anisotropic filtering properly and fixed the cvar's range and help
platform extension loading is done through Sys_GL_LoadExtensions
throwing fatal errors is done by the renderer exclusively
removed QGL_Init and QGL_Shutdown
cleaned up glconfig_t
filling up the unused glConfig fields in the renderer for old mods
2017-11-03 19:33:54 +01:00
myT
770199f00d fixed con_notifytime's range not allowing -1
fixed m_accelOffset's invalid default value
2017-10-28 19:36:16 +02:00
myT
62ff8ef1d1 fixed the renderer not always removing commands when it should 2017-10-04 00:35:26 +02:00
myT
1d6663ebc1 replaced the cameraMatrixTime variable from the renderer's public interface by a function 2017-10-03 23:31:35 +02:00
myT
70f301e4ff cvar help extension
cvar type+range extension
module tracking for cvars and commands
lots of help text
2017-10-03 19:11:10 +02:00
myT
37ef941ac2 fixed r_fullbright not being used and made it unlatched
removed the superfluous calls to GL_TexEnv for r_lightmap
2017-08-18 18:30:39 +02:00
myT
f9fbe4797f fixed r_lightmap not being used and made it archived
removed the r_maplight* cvars
removed dead code (RB_StageIteratorGeneric)
2017-08-18 17:03:30 +02:00
myT
ec042e37e1 added r_greyscale to control how monochromatic the final image looks
not doing the gamma pass when gamma==1 && obBits==0
no longer checking glConfig.colorBits for computing the global brightness
2017-08-18 16:02:02 +02:00
myT
eb4b1d8615 removed r_stencilbits r_depthbits r_colorbits r_texturebits r_ext_compressed_textures 2017-06-22 09:41:36 +02:00
myT
c63c3e80a6 replaced monitor gamma by a post-process gamma shader
ported the dyn lights shaders to glsl
nuked stereo rendering
replaced r_ext_multisample with r_msaa
2017-03-21 00:58:59 +01:00
myT
f327428475 full x64 support with a VM based on quake3e OCT 21 2016
the VM compiler uses SSE for floating-point ops when possible
2017-01-11 14:24:58 +01:00
arQon
954c80a8b5 merge the new build system
use the "premake" tool from the cnq3tools repo with
"--quake3dir=<q3dir>" to generate a VS sln and gcc makefiles

this changeset also removes the "clever" handling of fullscreen/windowed
changes which didn't actually work and just broke windowed mode
2016-12-29 20:13:59 -08:00
arQon
1afbf12d80 repair some strange quality regressions in the renderer source, as well as what looks like some half-merged pmx pieces. add glext for win32 platforms. NOTE: vc has poisoned a bunch of files with CRLF endings, because apparently you're not allowed to have those work properly in vs2013 and later, sigh 2016-12-18 03:05:45 -08:00
arQon
97db9f2314 import from cnq3 1.47 2016-12-17 20:43:04 -08:00