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
- 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
it happened because the color channels for blendColor weren't initialized,
that memory could have at least one channel initialized as a NaN value and
throwing a NaN in the shader logic would break it
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
- 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
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
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
- OBS' game capture plug-in can't handle swap chains changing while capture is active
- loading a map and disconnecting will no longer break the capture
- vid_restart will still break the capture
- 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
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
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)
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
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
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
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
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