]> git.rm.cloudns.org Git - xonotic/darkplaces.git/log
xonotic/darkplaces.git
6 years agoAdd r_shadow_culllights_trace feature, this culls rtlights by traceline checks simila...
havoc [Sun, 11 Mar 2018 19:26:55 +0000 (19:26 +0000)]
Add r_shadow_culllights_trace feature, this culls rtlights by traceline checks similar to entities.

Add r_shadow_culllights_pvs cvar so that the pvs checks can be turned off, for debugging or otherwise.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12349 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=05dbb25f75f5aeff3822a7feccad0e53a1d3c5be

6 years agoRework R_CanSeeBox a bit to support an eyejitter feature, and make it available throu...
havoc [Sun, 11 Mar 2018 19:24:42 +0000 (19:24 +0000)]
Rework R_CanSeeBox a bit to support an eyejitter feature, and make it available throughout the renderer.

Make TraceLineOfSight check if the trace endpos is within a box, not just if fraction is 1 - this makes it much more likely to say an object is visible when the object overlaps walls and other obstacles as the rays only need to reach the box, it doesn't matter much where it goes inside the box.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12348 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8ab339588b127e88e27bfa08f6eccbf9400b51f9

6 years agoChange shadowless rtlights so that they are not occluded by anything - no pvs checks...
havoc [Sun, 11 Mar 2018 19:08:41 +0000 (19:08 +0000)]
Change shadowless rtlights so that they are not occluded by anything - no pvs checks or portal culling.

This makes r_shadow_deferred 0 look the same as r_shadow_deferred 1 - lights fill their whole area if there are no shadows to block them.

This also fixes a popping issue with r_shadow_deferred 1 where the eye was not in a leaf the light considered to be visible, and thus the light was not drawn (which made quite a difference when you move back and forth between leafs that were and were not lit), since when it was drawn it lit everything in the area.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12347 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=445f3df93c496079a8d74fb3213bad5b5cc277ae

6 years agoDon't set MATERIALFLAG_NOSHADOW on SKY materials. They need to cast shadows to preve...
havoc [Sun, 11 Mar 2018 19:04:22 +0000 (19:04 +0000)]
Don't set MATERIALFLAG_NOSHADOW on SKY materials.  They need to cast shadows to prevent issues in e1m7 and other cases where sky occludes light bleed into other areas.

But when loading Q1BSP, set MATERIALFLAG_NOSHADOW on SKY if it has non-SOLID contents behind it, this supports the e1m5 logo shadow trick.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12346 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=bc190818e5b0a723ed94f270334acb7325f4684e

6 years agoFix a couple warnings for unused variables in listdirectory on WIN32.
havoc [Sun, 11 Mar 2018 18:53:55 +0000 (18:53 +0000)]
Fix a couple warnings for unused variables in listdirectory on WIN32.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12345 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ca4d37309cf7721bd7fd42d2a95ac5db7d057d01

6 years agoGrant access to the FULLVOLUME flag from the QC VM (allows custom background music...
divverent [Tue, 6 Mar 2018 01:21:11 +0000 (01:21 +0000)]
Grant access to the FULLVOLUME flag from the QC VM (allows custom background music mods that aren't affected by the volume cvar)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12344 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=603ac3cc0c6ca5f4a9ccbdac7af0d746c04c957e

6 years agoRemove the forced lower-casing in listdirectory on Windows, as it breaks
havoc [Wed, 29 Nov 2017 02:50:40 +0000 (02:50 +0000)]
Remove the forced lower-casing in listdirectory on Windows, as it breaks
the caseinsensitive=false case.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12343 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3fba31505b873b637e5d96e48a1bb6ad9b2bef41

6 years agoFix initialization of gunorg/vieworg when cl_followmodel/cl_leanmodel are disabled.
divverent [Tue, 31 Oct 2017 18:50:09 +0000 (18:50 +0000)]
Fix initialization of gunorg/vieworg when cl_followmodel/cl_leanmodel are disabled.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12342 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b525495b9939e6aec1fb8a44ebf0976589d26038

7 years agoTravis/Xonotic: use Ubuntu's mingw-w64 and fix linux32 dependency hell.
divverent [Thu, 28 Sep 2017 16:57:52 +0000 (16:57 +0000)]
Travis/Xonotic: use Ubuntu's mingw-w64 and fix linux32 dependency hell.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12341 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=e7409cd1bce830e40bc6d88e2b76a4cd6756e007

7 years agoFix bug with demo time
divverent [Fri, 22 Sep 2017 17:09:30 +0000 (17:09 +0000)]
Fix bug with demo time

Some demos may freeze at beginning, this fix this problem.

From: Slava Bacherikov <slava@bacher09.org>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12340 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=e5550cfc25f16584de466e54dad75de1c9a2837d

7 years agoMake work DrawQ_SetClipArea in stereo view modes or when viewsize is lower than 100
divverent [Fri, 22 Sep 2017 17:09:27 +0000 (17:09 +0000)]
Make work DrawQ_SetClipArea in stereo view modes or when viewsize is lower than 100

NOTE from divVerent: the previous followmodel-related commit was mistakenly attributed to me, but was actually by terencehill too.

Signed-off-by: terencehill <piuntn@gmail.com>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12339 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=023d02148e88cc846dbd76ffa312703c2eef1cd7

7 years agoAvoid running cl_followmodel and cl_leanmodel code if the relative cvars are turned off
divverent [Fri, 22 Sep 2017 16:46:56 +0000 (16:46 +0000)]
Avoid running cl_followmodel and cl_leanmodel code if the relative cvars are turned off

From: Rudolf Polzer <divVerent@xonotic.org>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12338 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=7ea20cf0fcba4cfd11d28738c211bf0d45e2ba32

7 years agoFix GLSL shader to only specify invariant gl_Position on the vertex shader, not the...
havoc [Wed, 30 Aug 2017 04:29:14 +0000 (04:29 +0000)]
Fix GLSL shader to only specify invariant gl_Position on the vertex shader, not the fragment shader - woops, this is what I get for not testing that change.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12337 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=175af02fa8e6bc5c14ebac952c6925f9328c2348

7 years agoUse the invariant keyword on gl_Position on GLSL 1.20 or higher and GLSL ES
havoc [Sun, 6 Aug 2017 15:33:55 +0000 (15:33 +0000)]
Use the invariant keyword on gl_Position on GLSL 1.20 or higher and GLSL ES
1.00 or higher, this should resolve zfighting between light polygons and
base surfaces.

A long long time ago this was using ftransform() which ensured invariance but use of the invariant keyword was not added when we switched away from that.

Thanks for the bug report:
https://www.reddit.com/r/quake/comments/6rwwm5/need_some_help_getting_quake_running_with/

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12336 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=72ae17123314e96c86e46ffd31426f1ed4a308a1

7 years agoSDL2: combine SDL_KEYDOWN events directly with following SDL_TEXTINPUT events when...
divverent [Mon, 10 Jul 2017 12:43:27 +0000 (12:43 +0000)]
SDL2: combine SDL_KEYDOWN events directly with following SDL_TEXTINPUT events when possible.

This solves ` keypresses that open/close the console also typing in a character
"once and for all". The ability to type the ` character into the console is not
impaired by this as con_closeontoggleconsole's logic to by default ignore the
toggleconsole key when in the console but not at the beginning of the line
still applies.

From: terencehill <piuntn@gmail.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12335 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=50312b15cfb7bd198d25aef3e999effe67e67b4e

7 years agorcon server: add an explicit check against empty password, instead of assuming the...
divverent [Wed, 26 Apr 2017 02:33:43 +0000 (02:33 +0000)]
rcon server: add an explicit check against empty password, instead of assuming the calling code is correct.

This logic had a bug in the past that had been introduced by r8886 and
accidentally fixed when introducing multi-account support in r9420. The bug was
that rcon_password being empty led to the empty password being accepted in some
cases, as there was never any explicit logic to handle that in rcon - it was
more "accidentally" rejected by a packet formatting check which does not apply
to srcon as the empty password wouldn't be empty over the wire.

In other words: DP builds from [r8886, r9419] had a serious vulnerability and
the only workaround is to always have rcon_password set.

The check added here will complain and reject in case the calling code for some
reason no longer prevents empty passwords from being accepted.

Also adding comments to the new logic explaining how it prevents the empty
password from being accepted.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12334 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=91e898971b8ec935b2d25e7cd0d26eb0c6a8d8a7

7 years agoMark a bug as done.
havoc [Sun, 23 Apr 2017 22:54:26 +0000 (22:54 +0000)]
Mark a bug as done.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12333 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=e258e3fe3240de023926bc7642159fc80e6fee62

7 years agoFix bug where r_showbboxes broke bloom texture updates by setting GL_CullFace in...
havoc [Sun, 23 Apr 2017 22:53:08 +0000 (22:53 +0000)]
Fix bug where r_showbboxes broke bloom texture updates by setting GL_CullFace in R_Bloom_MakeTexture.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12332 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c1878bd6bc94e9e53a1eeef0db5cd001f97f79f4

7 years agoFix a bug in collisions between brushes and brushes when the plane is rotating -...
havoc [Sun, 23 Apr 2017 22:20:45 +0000 (22:20 +0000)]
Fix a bug in collisions between brushes and brushes when the plane is rotating - this case is never used currently but it's definitely a bug worth fixing.

Thanks to Eduard Elin for the bug report.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12331 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=220d6cb7e084a11a1c8f99b0fd57c522e17d6cef

7 years agoRemoved the gray-out behavior on the gamma settings in the color control menu when...
havoc [Sun, 23 Apr 2017 22:05:47 +0000 (22:05 +0000)]
Removed the gray-out behavior on the gamma settings in the color control menu when hwgamma is unsupported or disabled.

Apply gamma correction to the color boxes in the color control menu when hwgamma is off so that they are an accurate preview.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12330 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=d935102f6ffdbfed14a50ee67f0231407c2073db

7 years agoFix bugs in ModList_RebuildList such that it no longer lists files in the quake direc...
havoc [Sun, 23 Apr 2017 20:25:39 +0000 (20:25 +0000)]
Fix bugs in ModList_RebuildList such that it no longer lists files in the quake directory as gamedirs.

These bugs were previously hidden by a different behavior in FS_CheckNastyPath until 20140716 where directories with a period in their name were skipped, but that was not a complete solution.

Thanks to klichka for bug report.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12329 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6fb644eee19956bee121e1f2430d2b84067dc056

7 years agoAdd VS2017 projects.
havoc [Sun, 23 Apr 2017 19:40:24 +0000 (19:40 +0000)]
Add VS2017 projects.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12328 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ac5dd620f7242770f8a94a2684a9dfe27e414793

7 years ago::stable-branch::reset=f6d8bf009aadd637cd9d7444a564ad1b662d2cf3
Rudolf Polzer [Sat, 8 Apr 2017 21:22:55 +0000 (23:22 +0200)]
::stable-branch::reset=f6d8bf009aadd637cd9d7444a564ad1b662d2cf3

7 years agoTravis build script: bump the min OS X version. xonotic-v0.8.2
divverent [Fri, 31 Mar 2017 21:47:12 +0000 (21:47 +0000)]
Travis build script: bump the min OS X version.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12327 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f6d8bf009aadd637cd9d7444a564ad1b662d2cf3

7 years agoTravis build script: bump the min OS X version.
divverent [Fri, 31 Mar 2017 21:47:12 +0000 (21:47 +0000)]
Travis build script: bump the min OS X version.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12327 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoAdded a bug reported by kristus (tcmod rotate breaking normalmapping)
havoc [Sat, 18 Mar 2017 15:37:30 +0000 (15:37 +0000)]
Added a bug reported by kristus (tcmod rotate breaking normalmapping)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12326 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoUse SDL 2.0.5 for Xonotic builds.
divverent [Wed, 8 Mar 2017 21:27:37 +0000 (21:27 +0000)]
Use SDL 2.0.5 for Xonotic builds.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12325 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2995daa9758c545c8727fa8f19a6cd7440b6464c

7 years agoUse SDL 2.0.5 for Xonotic builds.
divverent [Wed, 8 Mar 2017 21:27:37 +0000 (21:27 +0000)]
Use SDL 2.0.5 for Xonotic builds.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12325 d7cf8633-e32d-0410-b094-e92efae38249

7 years agor_coronas_occlusionquery: don't try using a GL20-requiring feature in the GL11/GL13...
divverent [Tue, 7 Mar 2017 19:12:17 +0000 (19:12 +0000)]
r_coronas_occlusionquery: don't try using a GL20-requiring feature in the GL11/GL13 render paths

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12324 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ef9b48fe33bd373656f2c426ab3f8440d6490077

7 years agoChat: accept K_KP_ENTER to end chat entry too.
divverent [Tue, 7 Mar 2017 18:33:54 +0000 (18:33 +0000)]
Chat: accept K_KP_ENTER to end chat entry too.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12323 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2ca2a9595705a793c0f643c2f4fe13f1b8cf4b69

7 years agoadded separate cl_nopred cvar to use when playing on qw servers since
havoc [Sat, 14 Jan 2017 19:33:33 +0000 (19:33 +0000)]
added separate cl_nopred cvar to use when playing on qw servers since
players expect prediction in quakeworld, now cl_movement is only used on
dp6/dp7 servers.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12322 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=9ba529f6b88337d1f8ca249a66dc060917e3c3e8

7 years agoRemove a confusing part of the description of r_shadow_shadowmapping
havoc [Mon, 2 Jan 2017 03:06:22 +0000 (03:06 +0000)]
Remove a confusing part of the description of r_shadow_shadowmapping
cvar.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12317 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=1b5514b0efe6eb17ef86493eaedee1d553b08c80

7 years agoChange darkplaces email address to darkplacesengine (on gmail) since
havoc [Mon, 2 Jan 2017 00:14:36 +0000 (00:14 +0000)]
Change darkplaces email address to darkplacesengine (on gmail) since
gmail has better spam filtering than the old host

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12314 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8aaf40dd53234a67cc8db41c0a1841d77b9e7852

7 years agoAdded an implementation of Lehmer random number generator with Lecuyer constant,...
havoc [Sun, 27 Nov 2016 21:45:11 +0000 (21:45 +0000)]
Added an implementation of Lehmer random number generator with Lecuyer constant, this is a simple mul128 based RNG with a period of 2^126.

Use the new RNG for bouncegrid traces to hopefully improve the photon distribution compared to lhcheeserandom.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12298 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8e10530c0564b56ff02e689d3d6839b8fcb88553

7 years agoAdded developer_memorylargerthanmb cvar which prints (with developer 1) notices about...
havoc [Sun, 27 Nov 2016 20:59:04 +0000 (20:59 +0000)]
Added developer_memorylargerthanmb cvar which prints (with developer 1) notices about very large memory allocations (16MB and larger by default).

Slightly improved the Mem_Alloc out of memory error to include the size of the failed allocation.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12292 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=9e8aa111b367c9c6fdf3c345431a9c61ef8b82a3

7 years agor_coronas_occlusionquery: don't try using a GL20-requiring feature in the GL11/GL13...
divverent [Tue, 7 Mar 2017 19:12:17 +0000 (19:12 +0000)]
r_coronas_occlusionquery: don't try using a GL20-requiring feature in the GL11/GL13 render paths

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12324 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoChat: accept K_KP_ENTER to end chat entry too.
divverent [Tue, 7 Mar 2017 18:33:54 +0000 (18:33 +0000)]
Chat: accept K_KP_ENTER to end chat entry too.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12323 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoadded separate cl_nopred cvar to use when playing on qw servers since
havoc [Sat, 14 Jan 2017 19:33:33 +0000 (19:33 +0000)]
added separate cl_nopred cvar to use when playing on qw servers since
players expect prediction in quakeworld, now cl_movement is only used on
dp6/dp7 servers.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12322 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoincrease MAX_CHANNELS to support quakemash
havoc [Sat, 7 Jan 2017 18:55:51 +0000 (18:55 +0000)]
increase MAX_CHANNELS to support quakemash

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12319 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8730ad8413fe46de8bdd61e4d0fb9b91abfa5563

7 years agoTravis changes for Xonotic:
divverent [Wed, 11 Jan 2017 21:50:45 +0000 (21:50 +0000)]
Travis changes for Xonotic:

- Do not require root any more.
- Change the i386 build to build on Ubuntu directly, not in a chroot created using debootstrap.
- Remove the -isysroot option for OS X as the path broke after some Travis change.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12321 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3a7b4a7b58c265534bafdab8558aa0ba7e9ea1d0

7 years agoTravis changes for Xonotic:
divverent [Wed, 11 Jan 2017 21:50:45 +0000 (21:50 +0000)]
Travis changes for Xonotic:

- Do not require root any more.
- Change the i386 build to build on Ubuntu directly, not in a chroot created using debootstrap.
- Remove the -isysroot option for OS X as the path broke after some Travis change.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12321 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoincrease MAX_CHANNELS to support quakemash
havoc [Sat, 7 Jan 2017 18:55:51 +0000 (18:55 +0000)]
increase MAX_CHANNELS to support quakemash

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12319 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoFix some crashes affecting dedicated quake servers where texture->materialshaderpass...
havoc [Tue, 3 Jan 2017 03:25:39 +0000 (03:25 +0000)]
Fix some crashes affecting dedicated quake servers where texture->materialshaderpass is NULL.  A few other tweaks to ca_dedicated checks that were redundant.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12318 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoRemove a confusing part of the description of r_shadow_shadowmapping
havoc [Mon, 2 Jan 2017 03:06:22 +0000 (03:06 +0000)]
Remove a confusing part of the description of r_shadow_shadowmapping
cvar.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12317 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoFix rogue mission pack (Dissolution of Eternity) plasma launcher which
havoc [Mon, 2 Jan 2017 01:12:46 +0000 (01:12 +0000)]
Fix rogue mission pack (Dissolution of Eternity) plasma launcher which
uses velocity so small initially that SV_CheckVelocity was zeroing it in
the denormal check - the threshold has been lowered by 3 digits since
this was really only meant to detect denormals, not mess with real
numbers

thanks to Roman for this bug report

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12316 d7cf8633-e32d-0410-b094-e92efae38249

7 years agochange shadowmapping atlas from 4096x4096 to 8192x8192 because it looks
havoc [Mon, 2 Jan 2017 00:26:06 +0000 (00:26 +0000)]
change shadowmapping atlas from 4096x4096 to 8192x8192 because it looks
bad when it has to degrade shadowmap resolution to fit into 4096x4096
some of the time in start.bsp

this texture size is 256MB and should fit on most video cards...

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12315 d7cf8633-e32d-0410-b094-e92efae38249

7 years agoChange darkplaces email address to darkplacesengine (on gmail) since
havoc [Mon, 2 Jan 2017 00:14:36 +0000 (00:14 +0000)]
Change darkplaces email address to darkplacesengine (on gmail) since
gmail has better spam filtering than the old host

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12314 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoDisable the __int128 code path for lehmer 128bit RNG because it doesn't
havoc [Sat, 10 Dec 2016 20:57:04 +0000 (20:57 +0000)]
Disable the __int128 code path for lehmer 128bit RNG because it doesn't
compile on an old XCode version I use.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12309 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoonly use __int128 math on x86_64
havoc [Sat, 10 Dec 2016 20:17:30 +0000 (20:17 +0000)]
only use __int128 math on x86_64

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12308 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix bug in loading additional skins after the ones that exist in the model in mdl...
havoc [Sat, 10 Dec 2016 19:50:51 +0000 (19:50 +0000)]
Fix bug in loading additional skins after the ones that exist in the model in mdl loader, which resulted in the missing texture being shown because the skin referenced a texture beyond num_textures.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12307 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoUse tighter bounds for bouncegrid texture
vic [Fri, 2 Dec 2016 20:19:47 +0000 (20:19 +0000)]
Use tighter bounds for bouncegrid texture

Calculate bounds enclosing all lights instead of using the world bounds.
Maps with unlit monster containers such as e1m7 benefit from reduced RAM usage.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12306 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix infinite loop that occurred in R_FrameData_Alloc if requesting > 256MB (which...
havoc [Sun, 27 Nov 2016 21:35:34 +0000 (21:35 +0000)]
Fix infinite loop that occurred in R_FrameData_Alloc if requesting > 256MB (which the per-chunk size was bounded to).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12295 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b18cecd7b0c37e696571dcb3abb22a79ad03dae7

8 years agoFix one trace I missed when adding skipsupercontentsmask, and a couple other ones...
havoc [Sun, 27 Nov 2016 21:42:53 +0000 (21:42 +0000)]
Fix one trace I missed when adding skipsupercontentsmask, and a couple other ones in comments.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12297 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=83074a20b0e488b3e7e58a573d96fd17e55e4580

8 years agoAdd skipsupercontentsmask parameter to all the collision implementations, this allows...
havoc [Sun, 27 Nov 2016 21:29:12 +0000 (21:29 +0000)]
Add skipsupercontentsmask parameter to all the collision implementations, this allows you to ignore brushes/surfaces matching the specified contents flags, the primary use is ignoring q1bsp sky surfaces which are SUPERCONTENTS_SKY and SUPERCONTENTS_SOLID, since SUPERCONTENTS_SOLID is in the hitsupercontentsmask it will normally block on sky surfaces, but this way it will not if they also have SUPERCONTENTS_SKY set.

Use the new skipsupercontentsmask feature for bouncegrid traces and certain other light traces.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12294 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a3482c67248044c9c3dfe6ef96781d2e814fdeeb

8 years agoAdded a MessageBox call in Sys_Error on Windows, matching the behavior of the wgl...
havoc [Sun, 27 Nov 2016 21:00:37 +0000 (21:00 +0000)]
Added a MessageBox call in Sys_Error on Windows, matching the behavior of the wgl client.  The typical error to desktop will be more informative now.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12293 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=7fea37c6939ee2f26c9acf8582c8ee27e991d700

8 years agoEnable /LARGEADDRESSAWARE on win32 builds in MSVS2015, to get 3GB address space rathe...
havoc [Sun, 27 Nov 2016 20:51:15 +0000 (20:51 +0000)]
Enable /LARGEADDRESSAWARE on win32 builds in MSVS2015, to get 3GB address space rather than 2GB.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12289 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=d0b62751636ffda4720ee9a4f8e829474f6e699c

8 years agoAdded cl_bob_limit cvar which limits the maximum rage of view bobbing in a smooth...
havoc [Tue, 11 Oct 2016 01:05:53 +0000 (01:05 +0000)]
Added cl_bob_limit cvar which limits the maximum rage of view bobbing in a smooth way (rather than limiting the velocity and cl_bob independently, it limits the strength of the bob before the sinewave is applied).  By default this is 7 (inspired by the quake limit of +4 to -7 range).

Added cl_bob_limit_heightcheck cvar (off by default) which uses tracelines to limit the maximum value of cl_bob_limit based on the ceiling and floor height.

Added cl_bob_velocity_limit cvar which replaces the hard-coded 400 in a few places for xyspeed purposes.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12286 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b7a1b307d1b7cb5fec3221d2f2b15af74791663d

8 years agoFix Q2BSP texture loading, Q2BSP contents issues, and add support for SURF_ALPHATEST...
havoc [Mon, 12 Sep 2016 05:13:44 +0000 (05:13 +0000)]
Fix Q2BSP texture loading, Q2BSP contents issues, and add support for SURF_ALPHATEST for any maps that might use it, force fullbright rendering on SURF_TRANS33/SURF_TRANS66/SURF_WARP textures which fixes the rain in 3v3gloom3.bsp and chainlink fence textures on tkse.bsp and glass transparency on gloom1se.bsp among others.  Also fix the SURF_FLOWING scroll rate when combined with SURF_WARP.

Also fixed the collision issues caused by stomping over Q1BSP data which caused traceline to break on Q1BSP after loading a Q2BSP map, thanks Supa for that bug report and finding other Q2BSP issues.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12284 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=4fa4227c4cadd099125636f085183062a50acf7d

8 years agoAdded MSVC++ 2015 projects.
havoc [Sat, 10 Sep 2016 20:24:15 +0000 (20:24 +0000)]
Added MSVC++ 2015 projects.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12280 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=cd16f7adf4fa1d5c70e6ee68a296db336a83015f

8 years agoFix MSVC++ 2015 warnings about variable scope and some narrowing conversions without...
havoc [Sat, 10 Sep 2016 19:36:13 +0000 (19:36 +0000)]
Fix MSVC++ 2015 warnings about variable scope and some narrowing conversions without type casts.

Fix some missing type casts in recent r_shadow.c changes that didn't compile as C++ successfully.

Remove r_shadow_shadowmaplod variable which is unused.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12279 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ad37bc7de1dce1d858f74df2d70dc214983fb934

8 years agoFix a typo in a field name.
havoc [Sun, 28 Aug 2016 07:08:50 +0000 (07:08 +0000)]
Fix a typo in a field name.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12278 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=dbc0ab84895b26254dd41c9b17cb16c77337e9a1

8 years agoAdded r_shadow_bouncegrid_lightpathsize which is an alternative to blur
havoc [Sun, 28 Aug 2016 05:29:09 +0000 (05:29 +0000)]
Added r_shadow_bouncegrid_lightpathsize which is an alternative to blur
- but in practice this is just slower at a value of 3 than 1 is with
  blur, so blur remains the default approach.

Implemented r_shadow_bouncegrid_floatcolors cvar which uses fp16 and
fp32 float formats to increase dynamic range.

Overhauled the default values of the bouncegrid cvars to look better.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12277 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c5b7dc9addac09cbfab5e592e9b2feea8d7da241

8 years agoimplemented r_shadow_bouncegrid_blur, this tremendously improves
havoc [Sat, 27 Aug 2016 22:28:59 +0000 (22:28 +0000)]
implemented r_shadow_bouncegrid_blur, this tremendously improves
quality at a cost of processing time, eliminating many rounding error
problems in all levels.

renamed several r_shadow_bouncegrid_* cvars to have a dynamic prefix,
and split spacing so that it can also be different between
static/dynamic modes (static now uses 32).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12276 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=9467a5d4d63a1d3587eff10afae41a853dea68f5

8 years agoRefactored r_shadow_bouncegrid light splatting code, it now makes an
havoc [Sat, 27 Aug 2016 19:34:06 +0000 (19:34 +0000)]
Refactored r_shadow_bouncegrid light splatting code, it now makes an
array of light paths and then performs their splatting in a separate
step with an optional sort.

Implemented culling of out-of-view light paths in dynamic mode.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12275 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=89a03d22b1150713885838429024a9df721d3bc5

8 years agoRefactored r_shadow_bouncegrid code into several functions, changed
havoc [Sat, 27 Aug 2016 18:00:00 +0000 (18:00 +0000)]
Refactored r_shadow_bouncegrid code into several functions, changed
photon distribution math to make the photons more stable from frame to
frame (in dynamic mode), the number of photons fired is now based on
r_shadow_bouncegrid_intensityperphoton rather than always going for
maximum photons (accordingly r_shadow_bouncegrid_photons has been
renamed maxphotons and will still apply the old logic if it must).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12274 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=96c5fb3f2bf6068164d1cd425965c0be51b92ea2

8 years agoFix a serious bug with r_shadow_bouncegrid_static where it used
havoc [Sat, 27 Aug 2016 03:17:49 +0000 (03:17 +0000)]
Fix a serious bug with r_shadow_bouncegrid_static where it used
R_CullBox and other view-dependent performance optimizations when
compiling the static texture - thanks to Vic for finding this bug!

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12273 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3dfd03a33dc34d8a469d9b2f334991de226fd897

8 years agokeys: do not send the text event of the toggleconsole bind to the console.
divverent [Tue, 29 Nov 2016 18:20:07 +0000 (18:20 +0000)]
keys: do not send the text event of the toggleconsole bind to the console.

This only affects SDL2's event handling, which sends events in the following order:

(keycode, 0, true)
(0, charcode, true)
(0, charcode, false)
(keycode, 0, false)

The input destination is toggled on the first event, and the console then would
receive the charcode events. Binds work differently though - their action is
queued into the console buffer, and executed at the end of the frame!

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12305 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b046f98ffbc506e32c13c46725e75a92eb861cef

8 years agokeys: do not send the text event of the toggleconsole bind to the console.
divverent [Tue, 29 Nov 2016 18:20:07 +0000 (18:20 +0000)]
keys: do not send the text event of the toggleconsole bind to the console.

This only affects SDL2's event handling, which sends events in the following order:

(keycode, 0, true)
(0, charcode, true)
(0, charcode, false)
(keycode, 0, false)

The input destination is toggled on the first event, and the console then would
receive the charcode events. Binds work differently though - their action is
queued into the console buffer, and executed at the end of the frame!

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12305 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoRewrote bouncegrid path splatting, it now has a cone shape which grows with distance...
havoc [Tue, 29 Nov 2016 03:24:12 +0000 (03:24 +0000)]
Rewrote bouncegrid path splatting, it now has a cone shape which grows with distance, which reduces the splotchy look (cvars r_shadow_bouncegrid_lightpathsize_initial and r_shadow_bouncegrid_lightpathsize_conespread control this).

Replaced r_shadow_bouncegrid_(static|dynamic)_energyperphoton with r_shadow_bouncegrid_(static|dynamic)_quality cvar which works opposite the old one and is automatically multiplied by spacing^2 so you no longer have to hand-tune it when changing spacing.

Turned off r_shadow_bouncegrid_blur by default - it's still useful but no longer completely necessary.

Replaced r_shadow_bouncegrid_dynamic_stablerandom with r_shadow_bouncegrid_rng_type (which defaults to Lehmer 128bit RNG) and added r_shadow_bouncegrid_rng_seed (which can be set to -1 for the time-based random that stablerandom <= 0 used to trigger).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12304 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoRemove redundant call to R_MakeResizeBufferBigger, which was also breaking C89 by...
havoc [Mon, 28 Nov 2016 04:00:44 +0000 (04:00 +0000)]
Remove redundant call to R_MakeResizeBufferBigger, which was also breaking C89 by having mixed variables and code.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12303 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix __int128 based implementation of mul128, needed more casts.
havoc [Mon, 28 Nov 2016 03:59:54 +0000 (03:59 +0000)]
Fix __int128 based implementation of mul128, needed more casts.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12302 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix severe bugs in mul128 implementation which was breaking the Lehmer RNG.
havoc [Mon, 28 Nov 2016 03:56:16 +0000 (03:56 +0000)]
Fix severe bugs in mul128 implementation which was breaking the Lehmer RNG.

Added gcc specific implementation of mul128 using __int128 intrinsic type.

Added unit tests for mul128 implementation.

Added r_shadow_bouncegrid_normalizevectors cvar, default on, this slightly brightens typical scenes, some more affected than others.

Changed the behavior of r_shadow_bouncegrid_dynamic_stablerandom to also affect static mode, changed it to use the light position as the RNG seed, and changed the meaning of stablerandom 1 to be lhcheeserandom again as it is fast and of sufficient quality, the Lehmer RNG is available as stablerandom 2 but it has a framerate hit in dynamic mode that I can't ignore.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12301 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoSignificant rework of bouncegrid photon distribution and coloring.
havoc [Sun, 27 Nov 2016 22:20:28 +0000 (22:20 +0000)]
Significant rework of bouncegrid photon distribution and coloring.

r_editlights mode now shows render stats in the overlay.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12300 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoChanged bouncegrid to use its own buffers (Mem_Alloc) instead of R_FrameData_Alloc...
havoc [Sun, 27 Nov 2016 21:52:57 +0000 (21:52 +0000)]
Changed bouncegrid to use its own buffers (Mem_Alloc) instead of R_FrameData_Alloc because bouncegrid can be > 500MB per allocation which is unreasonable pressure on R_FrameData_Alloc.

Reduce memory when using r_shadow_bouncegrid_blur by ping-ponging between two buffers rather than three.

Reduce memory when using small values of r_shadow_bouncegrid_(static|dynamic)_spacing by disabling blur and instead effectively increasing r_shadow_bouncegrid_lightpathsize by 2 (the result is identical, just slower).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12299 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoAdded an implementation of Lehmer random number generator with Lecuyer constant,...
havoc [Sun, 27 Nov 2016 21:45:11 +0000 (21:45 +0000)]
Added an implementation of Lehmer random number generator with Lecuyer constant, this is a simple mul128 based RNG with a period of 2^126.

Use the new RNG for bouncegrid traces to hopefully improve the photon distribution compared to lhcheeserandom.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12298 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix one trace I missed when adding skipsupercontentsmask, and a couple other ones...
havoc [Sun, 27 Nov 2016 21:42:53 +0000 (21:42 +0000)]
Fix one trace I missed when adding skipsupercontentsmask, and a couple other ones in comments.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12297 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoDon't allocate resize buffer for texture upload if the texture does not need to be...
havoc [Sun, 27 Nov 2016 21:36:38 +0000 (21:36 +0000)]
Don't allocate resize buffer for texture upload if the texture does not need to be resized (this helps with memory pressure on the bouncegrid texture which was causing a huge memory alloc every frame in dynamic mode).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12296 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix infinite loop that occurred in R_FrameData_Alloc if requesting > 256MB (which...
havoc [Sun, 27 Nov 2016 21:35:34 +0000 (21:35 +0000)]
Fix infinite loop that occurred in R_FrameData_Alloc if requesting > 256MB (which the per-chunk size was bounded to).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12295 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoAdd skipsupercontentsmask parameter to all the collision implementations, this allows...
havoc [Sun, 27 Nov 2016 21:29:12 +0000 (21:29 +0000)]
Add skipsupercontentsmask parameter to all the collision implementations, this allows you to ignore brushes/surfaces matching the specified contents flags, the primary use is ignoring q1bsp sky surfaces which are SUPERCONTENTS_SKY and SUPERCONTENTS_SOLID, since SUPERCONTENTS_SOLID is in the hitsupercontentsmask it will normally block on sky surfaces, but this way it will not if they also have SUPERCONTENTS_SKY set.

Use the new skipsupercontentsmask feature for bouncegrid traces and certain other light traces.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12294 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoAdded a MessageBox call in Sys_Error on Windows, matching the behavior of the wgl...
havoc [Sun, 27 Nov 2016 21:00:37 +0000 (21:00 +0000)]
Added a MessageBox call in Sys_Error on Windows, matching the behavior of the wgl client.  The typical error to desktop will be more informative now.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12293 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoAdded developer_memorylargerthanmb cvar which prints (with developer 1) notices about...
havoc [Sun, 27 Nov 2016 20:59:04 +0000 (20:59 +0000)]
Added developer_memorylargerthanmb cvar which prints (with developer 1) notices about very large memory allocations (16MB and larger by default).

Slightly improved the Mem_Alloc out of memory error to include the size of the failed allocation.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12292 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoRollback last change which was meant to be many smaller pieces.
havoc [Sun, 27 Nov 2016 20:56:03 +0000 (20:56 +0000)]
Rollback last change which was meant to be many smaller pieces.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12291 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoAdded developer_memorylargerthanmb cvar which dprints notices about very large memory...
havoc [Sun, 27 Nov 2016 20:53:09 +0000 (20:53 +0000)]
Added developer_memorylargerthanmb cvar which dprints notices about very large memory allocations (16MB and larger by default).

Slightly improved the Mem_Alloc out of memory error to include the size of the failed allocation.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12290 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoEnable /LARGEADDRESSAWARE on win32 builds in MSVS2015, to get 3GB address space rathe...
havoc [Sun, 27 Nov 2016 20:51:15 +0000 (20:51 +0000)]
Enable /LARGEADDRESSAWARE on win32 builds in MSVS2015, to get 3GB address space rather than 2GB.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12289 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix another bug in R_Shadow_PrepareLights_AddSceneLight - it was not increasing r_sha...
havoc [Tue, 11 Oct 2016 03:03:27 +0000 (03:03 +0000)]
Fix another bug in R_Shadow_PrepareLights_AddSceneLight - it was not increasing r_shadow_scenemaxlights.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12288 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix bad memory overrun bug in R_Shadow_PrepareLights_AddSceneLight - it was not multi...
havoc [Tue, 11 Oct 2016 02:56:31 +0000 (02:56 +0000)]
Fix bad memory overrun bug in R_Shadow_PrepareLights_AddSceneLight - it was not multiplying the array size by sizeof.

Thanks to Monster for reporting this bug.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12287 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoAdded cl_bob_limit cvar which limits the maximum rage of view bobbing in a smooth...
havoc [Tue, 11 Oct 2016 01:05:53 +0000 (01:05 +0000)]
Added cl_bob_limit cvar which limits the maximum rage of view bobbing in a smooth way (rather than limiting the velocity and cl_bob independently, it limits the strength of the bob before the sinewave is applied).  By default this is 7 (inspired by the quake limit of +4 to -7 range).

Added cl_bob_limit_heightcheck cvar (off by default) which uses tracelines to limit the maximum value of cl_bob_limit based on the ceiling and floor height.

Added cl_bob_velocity_limit cvar which replaces the hard-coded 400 in a few places for xyspeed purposes.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12286 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoOverhauled quake3 shader loading such that it now produces shader passes that could...
havoc [Wed, 14 Sep 2016 04:53:02 +0000 (04:53 +0000)]
Overhauled quake3 shader loading such that it now produces shader passes that could render the material mostly correctly (rendering not yet implemented for the pre/post passes the logic identifies).

Main visible effect of this is that quake3 maps look more correct, but don't have any fancy effects yet.

This changed the loaders for all other formats that produce texture_t as texture->materialshaderpass-> is the new source of truth for several things.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12285 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix Q2BSP texture loading, Q2BSP contents issues, and add support for SURF_ALPHATEST...
havoc [Mon, 12 Sep 2016 05:13:44 +0000 (05:13 +0000)]
Fix Q2BSP texture loading, Q2BSP contents issues, and add support for SURF_ALPHATEST for any maps that might use it, force fullbright rendering on SURF_TRANS33/SURF_TRANS66/SURF_WARP textures which fixes the rain in 3v3gloom3.bsp and chainlink fence textures on tkse.bsp and glass transparency on gloom1se.bsp among others.  Also fix the SURF_FLOWING scroll rate when combined with SURF_WARP.

Also fixed the collision issues caused by stomping over Q1BSP data which caused traceline to break on Q1BSP after loading a Q2BSP map, thanks Supa for that bug report and finding other Q2BSP issues.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12284 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoChanged naming of glsl/default.glsl and hlsl/default.hlsl to glsl/combined_crc*.glsl...
havoc [Mon, 12 Sep 2016 00:15:56 +0000 (00:15 +0000)]
Changed naming of glsl/default.glsl and hlsl/default.hlsl to glsl/combined_crc*.glsl and hlsl/combined_crc*.hlsl - these are now effectively versioned by the crc of the builtin shader code, so if customization is applied it must match the current crc of the engine shader.

This should prevent any future shader version compatibility issues (at the cost of customization being harder to maintain).

Refactored shadermodeinfo related code to clean it up and make it more maintainable.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12283 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoEnable shadowmapping on transparent surfaces.
havoc [Sun, 11 Sep 2016 23:06:22 +0000 (23:06 +0000)]
Enable shadowmapping on transparent surfaces.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12282 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoOverhauled shadowmap rendering to use an atlas texture, this is overall a speed loss...
havoc [Sun, 11 Sep 2016 23:05:08 +0000 (23:05 +0000)]
Overhauled shadowmap rendering to use an atlas texture, this is overall a speed loss on default settings (-7.7% fps on timedemo demo1, or -3% with r_shadow_deferred) but a gain on realtime world lighting (+21.1% normal, +1.7% with r_shadow_deferred) on NVIDIA GTX 680.

On video drivers with higher framebuffer switching costs, this should be a framerate gain in all situations.

Feature-wise this brings support (in future) for shadowmapping on transparent lit surfaces, and imposes an upper bound on how many pixels of shadowmaps will be rendered in a frame (shadowmap resolution automatically becomes more coarse on frames where they do not fit).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12281 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoAdded MSVC++ 2015 projects.
havoc [Sat, 10 Sep 2016 20:24:15 +0000 (20:24 +0000)]
Added MSVC++ 2015 projects.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12280 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix MSVC++ 2015 warnings about variable scope and some narrowing conversions without...
havoc [Sat, 10 Sep 2016 19:36:13 +0000 (19:36 +0000)]
Fix MSVC++ 2015 warnings about variable scope and some narrowing conversions without type casts.

Fix some missing type casts in recent r_shadow.c changes that didn't compile as C++ successfully.

Remove r_shadow_shadowmaplod variable which is unused.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12279 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix a typo in a field name.
havoc [Sun, 28 Aug 2016 07:08:50 +0000 (07:08 +0000)]
Fix a typo in a field name.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12278 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoAdded r_shadow_bouncegrid_lightpathsize which is an alternative to blur
havoc [Sun, 28 Aug 2016 05:29:09 +0000 (05:29 +0000)]
Added r_shadow_bouncegrid_lightpathsize which is an alternative to blur
- but in practice this is just slower at a value of 3 than 1 is with
  blur, so blur remains the default approach.

Implemented r_shadow_bouncegrid_floatcolors cvar which uses fp16 and
fp32 float formats to increase dynamic range.

Overhauled the default values of the bouncegrid cvars to look better.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12277 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoimplemented r_shadow_bouncegrid_blur, this tremendously improves
havoc [Sat, 27 Aug 2016 22:28:59 +0000 (22:28 +0000)]
implemented r_shadow_bouncegrid_blur, this tremendously improves
quality at a cost of processing time, eliminating many rounding error
problems in all levels.

renamed several r_shadow_bouncegrid_* cvars to have a dynamic prefix,
and split spacing so that it can also be different between
static/dynamic modes (static now uses 32).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12276 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoRefactored r_shadow_bouncegrid light splatting code, it now makes an
havoc [Sat, 27 Aug 2016 19:34:06 +0000 (19:34 +0000)]
Refactored r_shadow_bouncegrid light splatting code, it now makes an
array of light paths and then performs their splatting in a separate
step with an optional sort.

Implemented culling of out-of-view light paths in dynamic mode.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12275 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoRefactored r_shadow_bouncegrid code into several functions, changed
havoc [Sat, 27 Aug 2016 18:00:00 +0000 (18:00 +0000)]
Refactored r_shadow_bouncegrid code into several functions, changed
photon distribution math to make the photons more stable from frame to
frame (in dynamic mode), the number of photons fired is now based on
r_shadow_bouncegrid_intensityperphoton rather than always going for
maximum photons (accordingly r_shadow_bouncegrid_photons has been
renamed maxphotons and will still apply the old logic if it must).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12274 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFix a serious bug with r_shadow_bouncegrid_static where it used
havoc [Sat, 27 Aug 2016 03:17:49 +0000 (03:17 +0000)]
Fix a serious bug with r_shadow_bouncegrid_static where it used
R_CullBox and other view-dependent performance optimizations when
compiling the static texture - thanks to Vic for finding this bug!

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12273 d7cf8633-e32d-0410-b094-e92efae38249