Commit Graph

1996 Commits

Author SHA1 Message Date
Joshua Yanovski
a428a3ebba Fix clippy warnings, part 1.
There aer still a bunch of type too complex and
function takes too many arguments warnings that I'll fix later
(or ignore, since in the one case I did fix a function takes too
many arguments warning I think it made the code *less* readable).
2020-08-02 20:41:51 +02:00
Joshua Yanovski
ba54307540 Fix light animations so they are removed when the light turns off. 2020-07-30 13:22:42 +02:00
Joshua Yanovski
7e0f4bcbf0 Fix crash in edge case for pixel art. 2020-07-29 21:10:20 +02:00
Joshua Yanovski
56da06f7a3 Merge remote-tracking branch 'origin/master' into sharp/small-fixes 2020-07-29 18:56:52 +02:00
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
Marcel Märtens
96cde882ef update auth to the newest version and remove useless dep 2020-07-29 00:05:23 +02:00
Joshua Yanovski
7d56ba31b4 Merge remote-tracking branch 'origin/master' into sharp/small-fixes 2020-07-27 13:16:27 +02:00
Imbris
ba14440a49 Fix filtering out resize events in the ui 2020-07-26 18:21:20 -04:00
Samuel Keiffer
827b91d691 Bow charged shot attack 2020-07-26 03:06:53 +00:00
Imbris
6435464d00 Make video mode selection slightly better 2020-07-25 17:07:50 -04: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
Justin Shipsey
24f968d813 Merge branch 'quickfixes' into 'master'
small fixes

See merge request veloren/veloren!1221
2020-07-21 13:36:10 +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
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
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
d53ad7eb43 Fix color depth selection 2020-07-18 08:17:42 -04: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
Imbris
0275cc9523 Tweak pausing code to reduce duplication 2020-07-17 21:26:21 -04:00
Imbris
2f5c8fa3f3 Fixes for Alt key related issues 2020-07-17 21:26:21 -04:00
Imbris
27bfc74928 small fix and refactor stop auto walk to a method 2020-07-17 21:26:21 -04:00
Imbris
9bfb1b5f00 Fix rebase mistake 2020-07-17 21:26:21 -04:00
Imbris
97364d49ed Increment glutin version in Cargo.toml file 2020-07-17 21:26:20 -04:00
Imbris
a0d88e0774 Fix mistake with event processing 2020-07-17 21:26:20 -04:00
Imbris
f0d4ec32f5 clippy fixes 2020-07-17 21:26:20 -04:00
Imbris
8cd2207495 Proper fix for winit / cpal conflict 2020-07-17 21:26:20 -04:00
Imbris
29c877cff3 Winit 0.22 released 2020-07-17 21:26:16 -04:00
Imbris
61983b1b06 poll twice 2020-07-17 21:24:29 -04:00
Imbris
28e00a0f6e Fix singleplayer feature and rebase related stuff 2020-07-17 21:24:28 -04:00
Imbris
7dfb24d4a5 Clean comments, fix mistake, change dep source now that compatible version is available on crates.io 2020-07-17 21:24:28 -04:00
Imbris
5e8d74e00e fix Window::logical_size 2020-07-17 21:24:28 -04:00
Imbris
70eba0c30a Update changelog 2020-07-17 21:24:28 -04:00
Imbris
db91ebe9b5 fix a few minor bugs 2020-07-17 21:24:28 -04:00
Imbris
21a1382850 Update to winit 0.21.0 2020-07-17 21:24:28 -04:00
Imbris
d1b635efa4 Rearrange PlayState system to work without loop control 2020-07-17 21:24:28 -04:00
Imbris
515dbc30a7 Switch to updated gfx_window_glutin 2020-07-17 21:24:28 -04:00
Joshua Barretto
807a27328c Updated to winit 20 2020-07-17 21:24:27 -04:00
Samuel Keiffer
6cce09be85 Added protection stat to admin armor hidden in debug folder. Removed blue cultist armor set from drop table as it is an admin set. 2020-07-18 00:05:28 +00:00
Joshua Yanovski
add2cfae04 Revert some irrelevant stuff. 2020-07-16 01:57:39 +02:00
lausek
05cc6f222b avoid comparing to own entity when mounting; fix coding style 2020-07-15 15:31:42 +02:00
lausek
a3326b5744 fix #611; add distance check when mounting pet 2020-07-15 14:54:53 +02:00
Joshua Yanovski
2e2ab3dc1e Fixing various things about shadows.
* Correcting optimal LISPSM parameter.
* Figure shadows are cast when they're not visible.
* Chunk shadows stay cast until you look away.
* Seamless cubemaps for point lights.
* Etc.
2020-07-15 13:30:49 +02:00
Joshua Barretto
8d6b442193 Crafting 2020-07-14 20:11:39 +00:00
Marcel
d5bfae886e Merge branch 'xMAC94x/net-improve' into 'master'
xMac94x/net improve

See merge request veloren/veloren!1162
2020-07-14 14:09:43 +00:00
Joshua Barretto
446923f7d8 Merge branch 'zesterer/small-fixes' into 'master'
Zesterer/small fixes

See merge request veloren/veloren!1190
2020-07-14 09:54:17 +00:00
Joshua Barretto
3e5c3de2ac Neater compass 2020-07-13 23:23:44 +01:00