9 years agomove EXACTSPECULARMATH to the "lightweight" permutation system too, as there is no...
divverent [Thu, 14 Oct 2010 06:15:03 +0000 (06:15 +0000)]
move EXACTSPECULARMATH to the "lightweight" permutation system too, as there is no need to have it able to degrade

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

9 years agoadd back VorteX's "lightweight shader parameter" system, but have it detect cvar...
divverent [Thu, 14 Oct 2010 06:14:59 +0000 (06:14 +0000)]
add back VorteX's "lightweight shader parameter" system, but have it detect cvar changes and recompile all glsl shaders if any changed so these can be changed at runtime still

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

9 years agoremove r_glsl_saturation_redcompensate, as it's considered a hack and can be done...
vortex [Wed, 13 Oct 2010 22:49:54 +0000 (22:49 +0000)]
remove r_glsl_saturation_redcompensate, as it's considered a hack and can be done with postprocess customizing

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

9 years agoAdded dp_waterscroll <scale> <speed> shader keyword as simple simulation of water...
vortex [Wed, 13 Oct 2010 22:00:16 +0000 (22:00 +0000)]
Added dp_waterscroll <scale> <speed> shader keyword as simple simulation of water movement, use with dp_water. Works only with r_water 1.

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

9 years agoadd r_glsl_saturation_redcompensate optional effect to r_glsl_saturate (only works...
vortex [Wed, 13 Oct 2010 20:57:26 +0000 (20:57 +0000)]
add r_glsl_saturation_redcompensate optional effect to r_glsl_saturate (only works when saturate is below 1), will produce desaturation with red channel compensated. Tweaked water shader parms, added slight water animation by counter-scrolling 2 water normalmap layers in shader.

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

9 years agohope the scissor code is fine now
divverent [Wed, 13 Oct 2010 20:45:36 +0000 (20:45 +0000)]
hope the scissor code is fine now

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

9 years agobring old R_Shadow_ScissorForBBox code (new code still there, commented out), since...
vortex [Wed, 13 Oct 2010 20:33:30 +0000 (20:33 +0000)]
bring old R_Shadow_ScissorForBBox code (new code still there, commented out), since new code is broken on ATI cards, a temporary solution

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

9 years agooops, scissormode wasn't meant to be CVAR_SAVE
divverent [Wed, 13 Oct 2010 19:57:13 +0000 (19:57 +0000)]
oops, scissormode wasn't meant to be CVAR_SAVE

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

9 years agoshut up a gcc warning
divverent [Wed, 13 Oct 2010 19:46:10 +0000 (19:46 +0000)]
shut up a gcc warning

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

9 years agofix D3D scissoring
divverent [Wed, 13 Oct 2010 19:32:40 +0000 (19:32 +0000)]
fix D3D scissoring

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

9 years agofix another typo in the water rendering improvement
divverent [Wed, 13 Oct 2010 17:42:50 +0000 (17:42 +0000)]
fix another typo in the water rendering improvement

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

9 years agor_water_scissormode: 0 = none, 1 = scissor only, 2 = cull only, 3 = both
divverent [Wed, 13 Oct 2010 17:22:56 +0000 (17:22 +0000)]
r_water_scissormode: 0 = none, 1 = scissor only, 2 = cull only, 3 = both

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

9 years agoadjust for left handed coordinate system in a reflected view
divverent [Wed, 13 Oct 2010 17:18:55 +0000 (17:18 +0000)]
adjust for left handed coordinate system in a reflected view

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

9 years agor_water_scissormode: 0 = none, 1 = glScissor, 2 = glScissor and frustum culling
divverent [Wed, 13 Oct 2010 16:08:13 +0000 (16:08 +0000)]
r_water_scissormode: 0 = none, 1 = glScissor, 2 = glScissor and frustum culling

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

9 years ago"cl_movement_replay 0" to disable the built-in prediction
divverent [Wed, 13 Oct 2010 09:56:29 +0000 (09:56 +0000)]
"cl_movement_replay 0" to disable the built-in prediction

From: Jānis Rūcis <parasti@gmail.com>

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

9 years agoI have no idea why, but R_Viewport_TransformToScreen apparently should NOT invert...
divverent [Sun, 10 Oct 2010 16:36:44 +0000 (16:36 +0000)]
I have no idea why, but R_Viewport_TransformToScreen apparently should NOT invert y, as doing so breaks dynamic light rendering in size-reduced views (HDR, water)

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

9 years agoSSE patch by kyre, with runtime CPU detection and a cvar r_skeletal_use_sse if SSE...
divverent [Fri, 8 Oct 2010 17:54:16 +0000 (17:54 +0000)]
SSE patch by kyre, with runtime CPU detection and a cvar r_skeletal_use_sse if SSE is detected

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

9 years agofix another warning
divverent [Wed, 6 Oct 2010 11:20:45 +0000 (11:20 +0000)]
fix another warning

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

9 years agofix a syntax error. Why didn't my gcc catch it? clang does...
divverent [Wed, 6 Oct 2010 11:19:27 +0000 (11:19 +0000)]
fix a syntax error. Why didn't my gcc catch it? clang does...

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

9 years agofix misparsing of portless IPv6 addresses
divverent [Wed, 6 Oct 2010 09:48:53 +0000 (09:48 +0000)]
fix misparsing of portless IPv6 addresses

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

9 years agoadding my own IPv6 master server: dpmaster.div0.qc.to - default master server 4 ...
divverent [Wed, 6 Oct 2010 09:48:52 +0000 (09:48 +0000)]
adding my own IPv6 master server: dpdiv0.qc.to - default master server 4 (admin: divVerent) (only enabled if SUPPORTIPV6)

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

10 years agoturn off the weird "%interface_name" thing in IPv6 addresses, as it won't compare...
divverent [Sun, 3 Oct 2010 13:59:29 +0000 (13:59 +0000)]
turn off the weird "%interface_name" thing in IPv6 addresses, as it won't compare right

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

10 years agomake IPv6 addresses actually work in server queries
divverent [Sun, 3 Oct 2010 13:59:19 +0000 (13:59 +0000)]
make IPv6 addresses actually work in server queries

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

10 years agomake "status" support IPv6
divverent [Sun, 3 Oct 2010 13:06:58 +0000 (13:06 +0000)]
make "status" support IPv6

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

10 years agofix a stupid and trivial IPv6 bug that causes a v6 supporting engine to HANG
divverent [Sat, 2 Oct 2010 19:20:48 +0000 (19:20 +0000)]
fix a stupid and trivial IPv6 bug that causes a v6 supporting engine to HANG

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

10 years agodon't crash in obj loading if v, vt, or vn are NULL or the indices are
havoc [Thu, 30 Sep 2010 20:35:12 +0000 (20:35 +0000)]
don't crash in obj loading if v, vt, or vn are NULL or the indices are

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

10 years agodepthonly, prepass: do not compare lightmap texture for batching (less meshes)
divverent [Wed, 29 Sep 2010 07:23:15 +0000 (07:23 +0000)]
depthonly, prepass: do not compare lightmap texture for batching (less meshes)

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

10 years agofix lightmap switching/batching in fakelight
divverent [Wed, 29 Sep 2010 07:10:49 +0000 (07:10 +0000)]
fix lightmap switching/batching in fakelight

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

10 years agoRevert "for some reason, it's faster to always set the lightmaptexture (more than...
divverent [Wed, 29 Sep 2010 07:10:44 +0000 (07:10 +0000)]
Revert "for some reason, it's faster to always set the lightmaptexture (more than double fps) even if fakelight is enabled. LordHavoc, any idea why?"

This reverts commit 1a2ab86f0789c4b473dad83368c86634e4b7eb2c.

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

10 years agofor some reason, it's faster to always set the lightmaptexture (more than double...
divverent [Tue, 28 Sep 2010 12:04:38 +0000 (12:04 +0000)]
for some reason, it's faster to always set the lightmaptexture (more than double fps) even if fakelight is enabled. LordHavoc, any idea why?

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

10 years agor_fakelight: 1 = use "fake" lighting (falloff-less light source at eye origin) if...
divverent [Tue, 28 Sep 2010 12:04:33 +0000 (12:04 +0000)]
r_fakelight: 1 = use "fake" lighting (falloff-less light source at eye origin) if the loaded worldmodel is unlit, 2 = always use "fake" lighting; controlling cvar r_fakelight_intensity (0.75 is an empiric default value that on average seems to match the lightmap brightness of a selection of nexuiz maps)

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

10 years agoavoid crashes if MAX_SVBSP_POLYGONPOINTS would be exceeded
havoc [Mon, 27 Sep 2010 02:44:16 +0000 (02:44 +0000)]
avoid crashes if MAX_SVBSP_POLYGONPOINTS would be exceeded

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

10 years agocameras: when new eye pos == old eye pos, do not create a network eye
divverent [Sun, 26 Sep 2010 17:48:31 +0000 (17:48 +0000)]
cameras: when new eye pos == old eye pos, do not create a network eye

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

10 years agofix alpha in water rendering
divverent [Sun, 26 Sep 2010 17:37:40 +0000 (17:37 +0000)]
fix alpha in water rendering

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

10 years agofix autoload semantics of drawpics
divverent [Sun, 26 Sep 2010 16:45:18 +0000 (16:45 +0000)]
fix autoload semantics of drawpics

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

10 years agofix a display issue with warpzone decals I caused in my last change
divverent [Sun, 26 Sep 2010 12:14:21 +0000 (12:14 +0000)]
fix a display issue with warpzone decals I caused in my last change

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

10 years agofix warnings in terencehill's code
divverent [Sun, 26 Sep 2010 06:40:31 +0000 (06:40 +0000)]
fix warnings in terencehill's code

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

10 years agoallow .alpha to fade out water/refraction/reflection surfaces (only tested on refract...
divverent [Sat, 25 Sep 2010 19:48:30 +0000 (19:48 +0000)]
allow .alpha to fade out water/refraction/reflection surfaces (only tested on refraction at the moment, sorry)

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

10 years agoFix a typo (v_idlescale is always 0 there)
divverent [Sat, 25 Sep 2010 08:39:40 +0000 (08:39 +0000)]
Fix a typo (v_idlescale is always 0 there)

Signed-off-by: terencehill <piuntn@gmail.com>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10495 d7cf8633-e32d-0410-b094-e92efae38249

10 years agoFix showsound that cannot be shown alone cause of a missing check Simplify a bit...
divverent [Sat, 25 Sep 2010 08:39:37 +0000 (08:39 +0000)]
Fix showsound that cannot be shown alone cause of a missing check Simplify a bit the code to avoid redundant checks

Signed-off-by: terencehill <piuntn@gmail.com>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10494 d7cf8633-e32d-0410-b094-e92efae38249

10 years agoloadfont now prints a warning if it gets more than MAX_FONT_SIZES sizes and skips...
divverent [Sat, 25 Sep 2010 08:39:33 +0000 (08:39 +0000)]
loadfont now prints a warning if it gets more than MAX_FONT_SIZES sizes and skips duplicated sizes

Signed-off-by: terencehill <piuntn@gmail.com>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10493 d7cf8633-e32d-0410-b094-e92efae38249

10 years agoFix again u8_COM_StringLengthNoColors returning always 0 if end is NULL (strlennocol...
divverent [Sat, 25 Sep 2010 08:39:29 +0000 (08:39 +0000)]
Fix again u8_COM_StringLengthNoColors returning always 0 if end is NULL (strlennocol case), and counting 1 less character if the last character is multibyte and end is not NULL

Signed-off-by: terencehill <piuntn@gmail.com>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10492 d7cf8633-e32d-0410-b094-e92efae38249

10 years agoNew command 'history' and new shortcuts to search through the commands history
divverent [Sat, 25 Sep 2010 08:35:59 +0000 (08:35 +0000)]
New command 'history' and new shortcuts to search through the commands history

ctrl-, goes to the first command of the history
ctrl-. goes to the last command of the history

type a string (wildcards allowed) and
ctrl-f prints all the matching commands
ctrl-r searches backwards
ctrl-shift-r searches forwards

The last 2 shortcuts also point the history's index to the matching command but without fetching it to let one continue the search. To fetch it, it suffices to just press UP or DOWN.

Signed-off-by: terencehill <piuntn@gmail.com>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10491 d7cf8633-e32d-0410-b094-e92efae38249

10 years agoFix a possible crash when an invalid skinframe gets accessed after cl.time steps...
divverent [Fri, 24 Sep 2010 21:37:43 +0000 (21:37 +0000)]
Fix a possible crash when an invalid skinframe gets accessed after cl.time steps backwards (e.g. due to time syncing) right after an entity has been created. Might fix the steel storm crash, but certainly IS a segfault on unstable network connection. Note that a%b can be negative for a<0, b>0 (unlike mathematical 'mod' operation, C '%' is based on rounding towards zero)

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

10 years agocomment out another unused var
divverent [Fri, 24 Sep 2010 11:21:33 +0000 (11:21 +0000)]
comment out another unused var

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

10 years agoremove more unused code
divverent [Fri, 24 Sep 2010 11:11:11 +0000 (11:11 +0000)]
remove more unused code

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

10 years agoremove another unused variable
divverent [Fri, 24 Sep 2010 11:07:38 +0000 (11:07 +0000)]
remove another unused variable

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

10 years agoremove two unused vars
divverent [Fri, 24 Sep 2010 11:07:27 +0000 (11:07 +0000)]
remove two unused vars

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

10 years agofix another bug in the prologic patch :)
divverent [Fri, 24 Sep 2010 10:36:53 +0000 (10:36 +0000)]
fix another bug in the prologic patch :)

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

10 years agoallow bgmvolume to be > 1 to be able to exceed mastervolume (but this and other ...
divverent [Thu, 23 Sep 2010 05:17:14 +0000 (05:17 +0000)]
allow bgmvolume to be > 1 to be able to exceed mastervolume (but this and other "> 1" values are still clamped to 10, i.e. 10 dB); apply ReplayGain in SND_Spatialize instead of early when setting channel volume to better guard against clipping

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

10 years agochange clamping logic
divverent [Thu, 23 Sep 2010 05:17:09 +0000 (05:17 +0000)]
change clamping logic

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

10 years agoexpand volume accuracy from 8bit to 16bit; allow channel volume values to be > 1...
divverent [Thu, 23 Sep 2010 05:17:05 +0000 (05:17 +0000)]
expand volume accuracy from 8bit to 16bit; allow channel volume values to be > 1, and clamp the resulting volume

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

10 years agofix ambient sounds in prologic
divverent [Thu, 23 Sep 2010 04:40:22 +0000 (04:40 +0000)]
fix ambient sounds in prologic

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

10 years agofix a compile error and some warnings
havoc [Wed, 22 Sep 2010 16:21:11 +0000 (16:21 +0000)]
fix a compile error and some warnings

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

10 years agoProLogic patch by Joris Nijnuis, with some fixes
divverent [Wed, 22 Sep 2010 16:11:52 +0000 (16:11 +0000)]
ProLogic patch by Joris Nijnuis, with some fixes

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

10 years agoFix GAME_XONOTIC beging misplaced in gamemode_t->gamemode_info causing "gamemode...
vortex [Tue, 21 Sep 2010 21:49:23 +0000 (21:49 +0000)]
Fix GAME_XONOTIC beging misplaced in gamemode_t->gamemode_info causing "gamemode" to be initialized wrong. CSQC now knows "view_punchvector" and "view_punchangle" globals which is what it used to be.

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

10 years agoFixed dynamic light shadowmapping in D3D, still gotta fix them in deferred
tomaz [Tue, 21 Sep 2010 19:35:20 +0000 (19:35 +0000)]
Fixed dynamic light shadowmapping in D3D, still gotta fix them in deferred

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

10 years agoFixed the x axis flipped shadows, 1 step closer to getting all this to work perfecty...
tomaz [Sat, 18 Sep 2010 22:45:49 +0000 (22:45 +0000)]
Fixed the x axis flipped shadows, 1 step closer to getting all this to work perfecty in d3d9

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

10 years agodon't use D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL because it clears the backbuffer depth...
havoc [Sat, 18 Sep 2010 12:47:03 +0000 (12:47 +0000)]
don't use D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL because it clears the backbuffer depth on SetDepthStencilSurface calls

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

10 years agoFix a couple HLSL shader warnings
tomaz [Fri, 17 Sep 2010 22:58:16 +0000 (22:58 +0000)]
Fix a couple HLSL shader warnings

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

10 years agoForgot to put back the paranoid code
tomaz [Fri, 17 Sep 2010 22:47:57 +0000 (22:47 +0000)]
Forgot to put back the paranoid code

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

10 years agoMore debug code for shaders, this time it preprocesses the shader before saving it...
tomaz [Fri, 17 Sep 2010 22:47:20 +0000 (22:47 +0000)]
More debug code for shaders, this time it preprocesses the shader before saving it as an .fx file

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

10 years agofix some bugs in the HLSL shader, mostly to do with r_shadow_deferred
havoc [Fri, 17 Sep 2010 14:19:14 +0000 (14:19 +0000)]
fix some bugs in the HLSL shader, mostly to do with r_shadow_deferred
change texture unit for shadowmaps to 15 rather than 11 because this fixes a conflict between r_shadow_deferred 1 and r_shadows 2

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

10 years agoin D3D9 mode do not use the VSDCT cubemap because the ShadowMap_Parameters are comple...
havoc [Fri, 17 Sep 2010 11:28:24 +0000 (11:28 +0000)]
in D3D9 mode do not use the VSDCT cubemap because the ShadowMap_Parameters are completely incompatible in the D3D9 renderer

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

10 years agofix a crash in D3D9 with r_sky 0
havoc [Fri, 17 Sep 2010 11:24:52 +0000 (11:24 +0000)]
fix a crash in D3D9 with r_sky 0
cleaned up some shadowmap debugging code in D3D9 shader

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

10 years agoenable Tomaz's PIX-friendly shader debugging code if gl_paranoid is 1
havoc [Fri, 17 Sep 2010 09:16:30 +0000 (09:16 +0000)]
enable Tomaz's PIX-friendly shader debugging code if gl_paranoid is 1
made CHECKGLERROR not crash if qglGetError is NULL (as in D3D9 renderer for example)

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

10 years agoremove r_shadow_texturetype cvar (now always uses 2D textures), remove shadowmap...
havoc [Fri, 17 Sep 2010 08:56:55 +0000 (08:56 +0000)]
remove r_shadow_texturetype cvar (now always uses 2D textures), remove shadowmap cube and rect support
removed GL_ARB_texture_rectangle texture support throughout engine (nothing using it)
refactored D3D9 path in R_Mesh_SetRenderTargets in unsuccessful attempt to fix D3D9 shadowmapping

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

10 years agoAdded debug shaderflags used by the shader compiler which is needed to debug the...
tomaz [Thu, 16 Sep 2010 22:20:24 +0000 (22:20 +0000)]
Added debug shaderflags used by the shader compiler which is needed to debug the shaders in pix
Also added saving of vertstring and fragstring to disk and D3DXCompileShaderFromFileA to load them, this helps when debugging shaders in pix ( all commented out )

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

10 years agochange D3D9 implementation of TEXTYPE_SHADOWMAP textures to use CreateDepthStencilSur...
havoc [Thu, 16 Sep 2010 10:58:28 +0000 (10:58 +0000)]
change D3D9 implementation of TEXTYPE_SHADOWMAP textures to use CreateDepthStencilSurface instead of CreateTexture, this fixes lots of errors (PIX works, REF rasterizer works, etc)
implement freeing of D3D9 textures
disable the texture size padding on D3D9 as it was not the cause of PIX trouble

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

10 years agorestructure the previous fix so it actually does something
havoc [Thu, 16 Sep 2010 09:14:39 +0000 (09:14 +0000)]
restructure the previous fix so it actually does something

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

10 years agoon D3D9 renderer do not allow textures to be uploaded with a size smaller than 2xN...
havoc [Thu, 16 Sep 2010 08:45:34 +0000 (08:45 +0000)]
on D3D9 renderer do not allow textures to be uploaded with a size smaller than 2xN or Nx2 because the REF rasterizer refuses these (which makes PIX debugging hard)

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

10 years agoSet r_shadow_shadowmap2dcolortexture as first rendertarget when doing shadowmaps...
tomaz [Tue, 14 Sep 2010 20:49:41 +0000 (20:49 +0000)]
Set r_shadow_shadowmap2dcolortexture as first rendertarget when doing shadowmaps, sadly this didn't fix the shadowmaps but it at least fixed the white sky.

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

10 years agofix leaktest
divverent [Tue, 14 Sep 2010 19:17:37 +0000 (19:17 +0000)]
fix leaktest

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

10 years agoadd comments so I know which plane type is which
divverent [Tue, 14 Sep 2010 18:46:45 +0000 (18:46 +0000)]
add comments so I know which plane type is which

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

10 years agoTraceBrush: use in Collision_ClipToGenericEntity
divverent [Tue, 14 Sep 2010 18:46:41 +0000 (18:46 +0000)]
TraceBrush: use in Collision_ClipToGenericEntity

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

10 years agoadd a TraceBrush function to all model types, and implement it for BIH and Q3BSP
divverent [Tue, 14 Sep 2010 18:46:37 +0000 (18:46 +0000)]
add a TraceBrush function to all model types, and implement it for BIH and Q3BSP

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

10 years agoFix stencil shadows in D3D9
tomaz [Sun, 12 Sep 2010 01:38:43 +0000 (01:38 +0000)]
Fix stencil shadows in D3D9

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

10 years agoIgnored MSVC build directories
tomaz [Sat, 11 Sep 2010 09:54:18 +0000 (09:54 +0000)]
Ignored MSVC build directories
Silenced a warning in MSVC 2008

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

10 years agofix an inverted return value
divverent [Sat, 11 Sep 2010 00:20:09 +0000 (00:20 +0000)]
fix an inverted return value

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

10 years agoadd a type cast for C++
divverent [Fri, 10 Sep 2010 23:23:22 +0000 (23:23 +0000)]
add a type cast for C++

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

10 years agomake the win32 case compile too (hope it doesn't break TOO horribly above 4G RAM...
divverent [Fri, 10 Sep 2010 11:42:56 +0000 (11:42 +0000)]
make the win32 case compile too (hope it doesn't break TOO horribly above 4G RAM, someone please test)

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

10 years agoadd sys_memsize_virtual and sys_memsize_physical info cvars
divverent [Fri, 10 Sep 2010 11:26:57 +0000 (11:26 +0000)]
add sys_memsize_virtual and sys_memsize_physical info cvars

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

10 years agodo sound occlusion only once per sound, not once per listener channel
divverent [Thu, 9 Sep 2010 07:37:50 +0000 (07:37 +0000)]
do sound occlusion only once per sound, not once per listener channel

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

10 years agoremove sparks if slower than sqrt(0.03)
divverent [Thu, 9 Sep 2010 06:55:01 +0000 (06:55 +0000)]
remove sparks if slower than sqrt(0.03)

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

10 years agosound occlusion: use PVS by default, make the cvar able to toggle between PVS and...
divverent [Thu, 9 Sep 2010 06:54:58 +0000 (06:54 +0000)]
sound occlusion: use PVS by default, make the cvar able to toggle between PVS and LineOfSight occlusion

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

10 years agofix two warpzone related PVS bugs
divverent [Thu, 9 Sep 2010 06:54:55 +0000 (06:54 +0000)]
fix two warpzone related PVS bugs

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

10 years agonew option -benchmarkruns - if specified, the given number of benchmark runs is perfo...
divverent [Tue, 7 Sep 2010 07:37:02 +0000 (07:37 +0000)]
new option -benchmarkruns - if specified, the given number of benchmark runs is performed for -benchmark

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

10 years agofix CSQC being unable to use the "effects" field as its fieldoffset never got initialized
divverent [Mon, 6 Sep 2010 06:21:51 +0000 (06:21 +0000)]
fix CSQC being unable to use the "effects" field as its fieldoffset never got initialized

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

10 years agoAllow to type the utf8 Euro currency sign (to work around windows-1252 encoding)
divverent [Mon, 6 Sep 2010 05:09:56 +0000 (05:09 +0000)]
Allow to type the utf8 Euro currency sign (to work around windows-1252 encoding)

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

10 years agomake ctrl-key shortcuts in message mode display chars from the charmap even with...
divverent [Mon, 6 Sep 2010 05:09:53 +0000 (05:09 +0000)]
make ctrl-key shortcuts in message mode display chars from the charmap even with utf8 enabled

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

10 years agonew cvars: r_drawparticles_nearclip_min and r_drawparticles_nearclip_max, use a range...
divverent [Sun, 5 Sep 2010 17:34:29 +0000 (17:34 +0000)]
new cvars: r_drawparticles_nearclip_min and r_drawparticles_nearclip_max, use a range and fading for near clip of particles for speed optimization (fade them out before they become fullscreen)

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

10 years agoreorganize sv_public code; add a level -3 that blocks at getchallenge level, but...
divverent [Sun, 5 Sep 2010 15:48:51 +0000 (15:48 +0000)]
reorganize sv_public code; add a level -3 that blocks at getchallenge level, but -2 blocks at connect level (srcon needs getchallenge, so -3 also blocks srcon); also sv_public -2 will make connect attempts show the string in sv_public_rejectreason

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

10 years agooptimize R_AnimCache_UpdateEntityMeshBuffers to use memcpy instead of VectorCopy...
divverent [Sat, 4 Sep 2010 15:39:43 +0000 (15:39 +0000)]
optimize R_AnimCache_UpdateEntityMeshBuffers to use memcpy instead of VectorCopy, Steel Storm 150fps -> 167fps (now only effective in D3D mode, as this path is usually not used any more in OpenGL)

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

10 years agoclean up u8_StringLengthNoColors
divverent [Sat, 4 Sep 2010 15:32:12 +0000 (15:32 +0000)]
clean up u8_StringLengthNoColors

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

10 years agoSince u8_prevbyte skips invalid chars on purpose, it can go before the ] if invalid...
divverent [Sat, 4 Sep 2010 15:32:09 +0000 (15:32 +0000)]
Since u8_prevbyte skips invalid chars on purpose, it can go before the ] if invalid utf8 chars get pasted in the console edit line. It's even possible to delete the ].
Fix this bug by giving to u8_prevbyte the edit line without ].

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

10 years agoFix u8_COM_StringLengthNoColors not counting many ASCII chars (up to '?')
divverent [Sat, 4 Sep 2010 15:32:06 +0000 (15:32 +0000)]
Fix u8_COM_StringLengthNoColors not counting many ASCII chars (up to '?')

Better handling of invalid chars in u8_COM_StringLengthNoColors

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

10 years agoAdding GAME_XONOTIC and recognizing xonotic executable names
divverent [Sat, 4 Sep 2010 14:47:52 +0000 (14:47 +0000)]
Adding GAME_XONOTIC and recognizing xonotic executable names

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

10 years agobuild the string correctly
divverent [Fri, 3 Sep 2010 05:32:15 +0000 (05:32 +0000)]
build the string correctly

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

10 years agofix connect help
divverent [Fri, 3 Sep 2010 05:23:15 +0000 (05:23 +0000)]
fix connect help

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

10 years agoadded arg: connect-userinfo; works like this: "connect server password foobar" will...
divverent [Fri, 3 Sep 2010 05:20:33 +0000 (05:20 +0000)]
added arg: connect-userinfo; works like this: "connect server password foobar" will connect to server, and add \password\foobar to the infostring (works to connect to FTEQW passworded servers)

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