Commit Graph

5032 Commits

Author SHA1 Message Date
233d2e2685 Merge remote-tracking branch 'origin/master' into sharp/zoomy-worldgen 2023-04-12 19:39:23 -07:00
7aa43e9e8a Merge branch 'taoist/better-dullahan' into 'master'
taoist&floppy/cyclops&dullahan

See merge request veloren/veloren!3859
2023-04-12 22:53:38 +00:00
e32460f9ee taoist&floppy/cyclops&dullahan 2023-04-12 22:53:38 +00:00
9e17042bf6 Merge branch 'rtsim2' into 'master'
Initial implementation of rtsim2

Closes #1476

See merge request veloren/veloren!3517
2023-04-12 16:17:52 +00:00
16e3227f78 Correct localisation of numeric values, use coordinate conversions in rtsim 2023-04-12 10:36:11 +01:00
3582d86c70 Simplified localisation logic 2023-04-11 23:51:07 +01:00
3484e156d1 Allowed localisation content to be recursive 2023-04-11 23:18:34 +01:00
edcc2f1870 Overhauled chat message representation to allow for more exhaustive localisation 2023-04-11 15:46:36 +01:00
81b52298f0 Addressed review feedback 2023-04-11 10:34:06 +01:00
4ea635cc8d Merge branch 'imbris/random-tweaks-35902u8' into 'master'
Some misc tweaks

See merge request veloren/veloren!3861
2023-04-11 02:07:35 +00:00
70538dae66 Choose random plaza tile 2023-04-09 19:25:58 +01:00
3e0f5295c0 Added CharacterActivity, made NPCs look at the player when speaking to them 2023-04-09 19:25:57 +01:00
5aaee96cb1 Removed special-casing of merchants 2023-04-09 19:25:56 +01:00
364255c7fe Allowed rtsim NPCs to greet nearby actors 2023-04-09 19:25:55 +01:00
57efd24573 fix bench 2023-04-09 19:25:55 +01:00
d53b344c23 make merchants use tell, and general cleanup 2023-04-09 19:25:55 +01:00
b022076a5c Fallback for non-trades 2023-04-09 19:25:55 +01:00
ea007ff702 Cleaning up 2023-04-09 19:25:55 +01:00
acecc62d40 sync 2023-04-09 19:25:53 +01:00
0b4d3c9e20 Fixed scaling of airships 2023-04-09 19:25:53 +01:00
e8b489a71a sync 2023-04-09 19:25:53 +01:00
8ff438bb5b Smol animals 2023-04-09 19:25:51 +01:00
c856f2625c Added rtsim sites 2023-04-09 19:25:51 +01:00
f349e99cfb Better camera at smaller scales 2023-04-09 19:25:51 +01:00
87a6143375 Began adding rtsim2 NPCs, scale command 2023-04-09 19:25:51 +01:00
d5e324bded Fixed bad comment 2023-04-09 19:25:51 +01:00
14ea19be34 Merge remote-tracking branch 'origin/master' into sharp/zoomy-worldgen 2023-04-08 02:59:23 -07:00
54c39c03f7 Merge branch 'imbris/pixel-perfection-v2' into 'master'
Move image scaling into the UI shaders rather than precomputing it on the CPU

Closes #257

See merge request veloren/veloren!3573
2023-04-08 07:06:19 +00:00
5881e44e61 Address review on 3573 2023-04-08 02:19:14 -04:00
2a9a63a60e Clippy fixes 2023-04-08 00:51:50 -04:00
132ce72246 Fix some comments that were mis-formatted by rustfmt
and remove TODO that is now documented as a review comment
2023-04-08 00:51:50 -04:00
9cdfb6a4aa Resolve some remaining TODOs for ui image processing changes
* Explicitly assert that neither of the requested dimensions for an
  image are 0. (I think this used to fail later on anyway)
* Don't show the UI alpha premultiply pass in GPU timings in the HUD
  debug info display since it only very transiently appears (since this
  doesn't run every frame).
2023-04-08 00:29:29 -04:00
7205d4c275 Remove extra performance debugging code 2023-04-08 00:28:32 -04:00
63096b2042 Complete GPU based alpha premultiplication impl and make the CPU version
even faster.

* GPU based version started in previous commit, but this fixes errors
  and bugs and gets it actually compiling and running.
* Add a way to batch together images to use the same render pass for GPU
  premultiplication if they all target the same texture.
* Pending premultiplication uploads are automatically done when calling
  `Drawer::third_pass`.
* `fast-srgb8` dep removed, we no longer convert to `f32`s to do the
  premultiplication. Two `[u16; 256]` tables are combined to compute the
  alpa premultiplied color within the same error bounds used by the
  `fast-srgb8` crate. We also no longer use explicit simd.
* Remove explicit lifetimes from `PlayState::render` since `&self` and
  `Drawer<'_>` don't need to have the same lifetime.
* Fix existing bug where invalidated cache entries were never set to
  valid when reusing them.
* `prepare_graphic` now runs some heuristics to determine whether
  premultiplication should be executed CPU side or GPU side and then
  returns a bool indicating if GPU premultiplication is needed.
2023-04-08 00:28:31 -04:00
efd932c71e Progress on GPU premultiplication.
* General progress in setting up code paths to support GPU
  premultiplication.
* Created `PremultiplyUpload` type to represent an initiated image
  upload where the premultiply pass needs to be ran to complete it.
* Converted from compute pass to render pass since current limitations
  make it difficult to write directly to a srgb image from a compute
  shader.
* Replace `CachedDetails::Immutable` with keeping track of the
  parameters used to create the texture (i.e. the border color).
* Create `TextureRequirements`, `TextureParamters`, and `CacheKey` types
  to encode parameters that go into texture creation and image caching
  and to determine when the space in texture memory should be reused
  when replacing a graphic.
* Add custom texture creation logic for the UI textures since those need
  certain usage combinations.
2023-04-08 00:28:31 -04:00
1d51aae3b2 Start attempt to premultiply alpha on the GPU. 2023-04-08 00:28:31 -04:00
7538b04348 Operate on 4 pixels at a time when premultiplying alpha to speed things up a little. 2023-04-08 00:28:31 -04:00
f62c2cde70 Use fast-srgb8 crate to efficiently convert between non-linear srgb u8 and
linear f32 values for performing alpha premultiplication on the CPU.
2023-04-08 00:28:31 -04:00
eb6d16b02c Rename draw_graphic -> prepare_graphic since it is no longer always
specifically rendering an image at the provided dimensions. Start
working on alpha premultipication which is necessary for being able to
properly sample colors on the GPU with bilinear filtering. Various
tweaks to comments and misc changes.
2023-04-08 00:28:31 -04:00
69a1a661b6 fixes and tweaks (various minor changes related to UI image scaling on
GPU)
2023-04-08 00:28:31 -04:00
d62bf8a790 init (scaling UI images during sampling on the GPU instead of on the CPU) 2023-04-08 00:28:28 -04:00
e20cf5f14f Reduce rand::thread_rng calls, document MeleeConstructor scaled field more, remove extra stances.get() in hud/mod.rs 2023-04-07 01:59:41 -04:00
162509e1c9 Merge branch 'sam/durability' into 'master'
Durability

See merge request veloren/veloren!3509
2023-04-06 22:42:52 +00:00
e03406b103 fixed a bug where if a group member picks up an item, then the player picks up an item, it would display the incorrect number of items picked up. example: group member picks up an apple, then player picks up an apple, the ui would display that the player picked up two apples, instead of the group member picking up one and the player picking up one 2023-04-06 13:43:11 -05:00
4881d2fd8b fixed a bug where if a group member picks up an item, then the player picks up an item, it would display the incorrect number of items picked up. example: group member picks up an apple, then player picks up an apple, the ui would display that the player picked up two apples, instead of the group member picking up one and the player picking up one 2023-04-06 12:40:08 -05:00
0c99438993 Small fix to executor scheduling.
Also some preliminary separation for new lighting and removal of some
unneeded checks.
2023-04-06 08:33:43 -07:00
29a7520a48 adjusted death message, fixed repair bench text 2023-04-06 10:57:17 -04:00
Sam
132f26dbc0 Addressed review 2023-04-06 10:57:16 -04:00
Sam
00710a4eb0 Fixed csv tools 2023-04-06 10:57:13 -04:00
Sam
e4ebd17363 Addressed feedback 2023-04-06 10:57:12 -04:00