Commit Graph

4697 Commits

Author SHA1 Message Date
Joshua Yanovski
cf74d55f2e Fix map image artifacts and remove unneeded allocations.
Specifically, we address three concerns (the image stretching during
rotation, artifacts around the image due to clamping to the nearest
border color when the image is drawn to a larger space than the image
itself takes up, and potential artifacts around a rotated image which
accidentally ended up in an atlas and didn't have enough extra space to
guarantee the rotation would work).

The first concern was addressed by fixing the dimensions of the map
images drawn from the UI (so that we always use a square source
rectangle, rather than a rectangular one according to the dimensions of
the map).  We also fixed the way rotation was done in the fragment
shader for north-facing sources to make it properly handle aspect ratio
(this was already done for north-facing targets).  Together, these fix
rendering issues peculiar to rectangular maps.

The second and third concerns were jointly addressed by adding an
optional border color to every 2D image drawn by the UI.  This turns
out not to waste extra space even though we hold a full f32 color
(to avoid an extra dependency on gfx's PackedColor), since voxel
images already take up more space than Optiion<[f32; 4]> requires.
This is then implemented automatically using the "border color"
wrapping method in the attached sampler.

Since this is implemented in graphics hardware, it only works (at
least naively) if the actual image bounds match the texture bounds.
Therefore, we altered the way the graphics cache stores images
with a border color to guarantee that they are always in their own
texture, whose size exactly matches their extent.  Since the easiest
currently exposed way to set a border color is to do so for an
immutable texture, we went a bit further and added a new "immutable"
texture storage type used for these cases; currently, it is always
and automatically used only when there is a specified border color,
but in theory there's no reason we couldn't provide immutable-only
images that use the default wrapping mdoe (though clamp to border
is admittedly not a great default).

To fix the maps case specifically, we set the border color to a
translucent version of the ocean border color.  This may need
tweaking going forward, which shouldn't be hard.

As part of this process, we had to modify graphics replacement to
make sure immutable images are *removed* when invalidated, rather
than just having a validity flag unset (this is normally done by
the UI to try to reuse allocations in place if images are updated
in benign ways, since the texture atlases used for Ui do not
support deallocation; currently this is only used for item images,
so there should be no overlap with immutable image replacement,
so this was purely precautionary).

Since we were already touching the relevant code, we also updated
the image dependency to a newer version that provides more ways
to avoid allocations, and made a few other changes that should
hopefully eliminate redundant most of the intermediate buffer
allocations we were performing for what should be zero-cost
conversions.  This may slightly improve performance in some
cases.
2020-07-29 18:29:52 +02:00
Joshua Yanovski
ad18ce9399 Fix continent scale hack. 2020-07-28 13:21:09 +02:00
Joshua Yanovski
36b1cb074f Enable loading different sized maps without a recompile.
We may want to tweak the effects of the continent_scale_hack.
2020-07-28 12:11:40 +02:00
Joshua Yanovski
13b6d4d534 Removing WORLD_SIZE, part 1.
Erased almost every instance of WORLD_SIZE and replaced it with a local
power of two, map_size_lg (which respects certain invariants; see
common/src/terrain/map.rs for more details about MapSizeLg).  This also
means we can avoid a dependency on the world crate from client, as
desired.

Now that the rest of the code is not expecting a fixed WORLD_SIZE, the
next step is to arrange for maps to store their world size, and to use
that world size as a basis prior to loading the map (as well, probably,
as prior to configuring some of the noise functions).
2020-07-28 10:55:48 +02:00
Joshua Yanovski
30b1d2c642 Merge remote-tracking branch 'origin/sharp/small-fixes' into sharp/small-fixes 2020-07-27 13:16:58 +02:00
Joshua Yanovski
7d56ba31b4 Merge remote-tracking branch 'origin/master' into sharp/small-fixes 2020-07-27 13:16:27 +02:00
Marcel
598f14b258 Merge branch 'yusdacra/update-tr-translation' into 'master'
tr_TR localization: add missing and update some keys

See merge request veloren/veloren!1229
2020-07-27 08:16:20 +00:00
Marcel
400090f897 Merge branch 'snowram/french-translation' into 'master'
fr_FR: Loading tips and villagers attack speech

See merge request veloren/veloren!1230
2020-07-27 08:16:14 +00:00
Imbris
ae9f4d5a53 Merge branch 'imbris/resize-fix' into 'master'
Fix filtering out resize events in the ui

See merge request veloren/veloren!1232
2020-07-26 23:27:53 +00:00
Imbris
ba14440a49 Fix filtering out resize events in the ui 2020-07-26 18:21:20 -04:00
Yusuf Bera Ertan
a76d2d3746
tr_TR localization: add missing and update some keys 2020-07-26 12:59:40 +03:00
Imbris
1123073bfd Merge branch 'sam/arrow-charged-shot' into 'master'
Bow charged shot attack

See merge request veloren/veloren!1226
2020-07-26 03:06:53 +00:00
Samuel Keiffer
827b91d691 Bow charged shot attack 2020-07-26 03:06:53 +00:00
Imbris
9156dbadb8 Merge branch 'sam/armor-fixes' into 'master'
Armor fixes

See merge request veloren/veloren!1222
2020-07-25 23:57:04 +00:00
Samuel Keiffer
527e7a329e Armor fixes 2020-07-25 23:57:04 +00:00
Imbris
c63a1d64e2 Merge branch 'imbris/fix' into 'master'
Make video mode selection slightly better

See merge request veloren/veloren!1227
2020-07-25 22:25:30 +00:00
Imbris
6435464d00 Make video mode selection slightly better 2020-07-25 17:07:50 -04:00
Snowram
20c2fd2c0b Loading tips and villagers attack speech 2020-07-23 20:31:47 +02:00
Marcel
d25508e2df Merge branch 'lausek/admin-joining' into 'master'
fix #660; Admins should join even if they aren't on whitelist

Closes #660

See merge request veloren/veloren!1219
2020-07-23 17:16:52 +00:00
lausek
f7a3a622e5 fix #660; Admins should join even if they aren't on whitelist 2020-07-23 17:16:52 +00:00
Monty Marz
ff178b503d Merge branch 'hotfix_filepath' into 'master'
Hotfix filepath

See merge request veloren/veloren!1225
2020-07-23 14:02:22 +00:00
Monty Marz
9497d7e711 Update terrain.rs 2020-07-23 15:01:39 +02:00
Monty Marz
c903e27160 Merge branch 'pfau/loading_tips' into 'master'
Loading Screen tips

See merge request veloren/veloren!1224
2020-07-23 12:10:14 +00:00
Monty Marz
31cfc05123 lots of things
animation fixes by slipped
new cultist item
settings option for loading screen tips
loot table adjustments
2020-07-23 12:10:13 +00:00
Marcel
e912e3940f Merge branch 'xMAC94x/netfix2' into 'master'
Participant closure was immeatiatly, even in case a new participant was...

See merge request veloren/veloren!1223
2020-07-23 08:39:33 +00:00
Marcel Märtens
46b4c87cf3 fixed !688 2020-07-22 09:50:26 +02:00
Marcel Märtens
dd581bc6c0 Participant closure was immeatiatly, even in case a new participant was connected, send a MSG and then dropped immeadiatly.
The remote site should see it connect, be open for 1 single stream and read the message before it's notified that the participant is closed actually.

This caused the faulure in one of our API tests (in lib, with client and server). Where it was possible that all messages were send and one side was dropped before the other side asked for the opened stream

Also introduce better error detection in participant(and scheduler) by removing the std_async::Result and intruduce `Result<(),ParticipantError>` instead
2020-07-22 09:18:15 +02:00
Justin Shipsey
24f968d813 Merge branch 'quickfixes' into 'master'
small fixes

See merge request veloren/veloren!1221
2020-07-21 13:36:10 +00:00
Marcel
eae5470f7d Merge branch 'T-Dark-char-alias-slur-check-hotfix' into 'master'
T dark char alias slur check hotfix

See merge request veloren/veloren!1215
2020-07-21 09:59:00 +00:00
T-Dark0
fd9ec8fbd0 Voxygen and server-cli no longer panic if server creation returns error
The process just exists instead
2020-07-21 09:59:00 +00:00
jshipsey
5b76ed23f4 small fixes 2020-07-20 21:37:13 -04:00
Forest Anderson
62005e9031 Merge branch 'sharp/fix-corrupted-inventory' into 'master'
Fix corrupted character inventories by adding protection.

See merge request veloren/veloren!1220
2020-07-20 01:34:48 +00:00
Joshua Yanovski
51ff7cded2 Fix corrupted character inventories by adding protection.
This is a temporary bandaid until we move to our new schema, but it
should at least allow people to log in with old characters.
2020-07-20 02:34:43 +02:00
Monty Marz
1377b369f6 more saturated pumpkins 2020-07-19 23:25:38 +02:00
Monty Marz
2d4841a4ec Merge branch 'pfau/fix_chat_cutting' into 'master'
Fix cut off chat

See merge request veloren/veloren!1218
2020-07-18 21:56:45 +00:00
Monty Marz
e353bd3cfc Fix cut off chat 2020-07-18 21:56:45 +00:00
Imbris
d46bf03e27 Merge branch 'imbris/screenshot-tweak' into 'master'
Only screenshot and toggle fullscreen once per frame

See merge request veloren/veloren!1217
2020-07-18 19:08:42 +00:00
Imbris
3c954534ed Merge branch 'treeco/fix-spawn-damage' into 'master'
Reset rather than accumulate velocity when stuck or in unloaded chunks

See merge request veloren/veloren!1185
2020-07-18 19:08:40 +00:00
Monty Marz
ae8d50527f acacia models 2020-07-18 20:29:56 +02:00
Joshua Yanovski
2101113b46 Higher detail LOD. 2020-07-18 18:55:25 +02:00
Imbris
14d500abbc Only screenshot and toggle fullscreen once per frame 2020-07-18 12:21:22 -04:00
Imbris
e6776f3dce Merge branch 'imbris/colorfix' into 'master'
Fix color depth selection

See merge request veloren/veloren!1216
2020-07-18 14:10:10 +00:00
Imbris
d53ad7eb43 Fix color depth selection 2020-07-18 08:17:42 -04:00
Imbris
c7e8a6bfae Remove gravity rather than reset velocity in unloaded chunks 2020-07-18 07:13:30 -04:00
Imbris
23e1378c78 Merge branch 'zesterer/winit-20' into 'master'
Upgrade winit to 0.22.2

See merge request veloren/veloren!788
2020-07-18 03:26:59 +00:00
Imbris
db36578f83 Merge branch 'Menko/utility_items_fix_issue_612' into 'master'
#612 Fixed utility items not being removed from inventory/hotbar

See merge request veloren/veloren!1123
2020-07-18 02:41:45 +00:00
Nemanja
5caa6a07b0 #612 Fixed utility items not being removed from inventory/hotbar 2020-07-18 02:41:45 +00:00
Imbris
2a9785a40c Remove supplement_events from Window, fix suppresed clippy lint, actually use exlusive fullscreen instead of a borderless window 2020-07-17 22:18:43 -04:00
Imbris
c8133ded43 Fix issue where client_init was not set to None after it finished, use tweaked version of winit to avoid macos link failure in the CI, small comment fixes 2020-07-17 21:26:21 -04:00
Imbris
953773e1d3 Temporarily remove voxygen character_renderer example until we move to a more actively maintained rendering backend 2020-07-17 21:26:21 -04:00