]> git.xonotic.org Git - xonotic/darkplaces.git/commit
Refactored lightmap update handling and added cvars to replace gl_nopartialtextureupd...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 Nov 2020 06:40:43 +0000 (06:40 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 Nov 2020 06:40:43 +0000 (06:40 +0000)
commit0406d64e716af8e93af0638e1942d576f9fa94d9
tree5ea1fd2c17b15afc455431cc241d5da1bfd6e15a
parent1bb1e537a6ef9fa865d947dc2b4127f3b6cc2fec
Refactored lightmap update handling and added cvars to replace gl_nopartialtextureupdates cvar with finer-grained control:
* r_q1bsp_lightmap_updates_enabled (default 1 - shouldn't turn this off)
* r_q1bsp_lightmap_updates_combine (default 2 - upload full lightmap texture)
* r_q1bsp_lightmap_updates_hidden_surfaces (default 0 - if turned on it may improve fps when the view is moving/turning by only uploading lightmaps on certain frames)

Previously there was a bug that made hidden surfaces get lightmap updates, which was never intended, but a cvar was added to allow the behavior to be toggled in case it has some use.

Overall this change performs better on AMD drivers for Windows, and is expected to perform a lot better on all Mesa drivers for Linux as they have even worse performance with partial texture update locking, it may reduce performance on NVIDIA drivers for Windows as they have always had good handling of thousands of small partial texture updates.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13056 d7cf8633-e32d-0410-b094-e92efae38249
gl_draw.c
gl_rmain.c
gl_rsurf.c
gl_textures.c
r_shadow.c
r_textures.h
render.h