Commit Graph

677 Commits

Author SHA1 Message Date
Joshua Barretto
aeb72bcf22 Added support for block kinds in shaders 2023-05-15 17:31:21 +01:00
Joshua Barretto
4253833aaf Add photorealistic experimental shader 2023-05-12 14:02:23 +01:00
Joshua Barretto
1924c67033 Adjusted night ambience 2023-05-12 13:47:01 +01:00
Isse
f6f332af6a send full matrix to shader 2023-05-09 19:43:10 +02:00
Isse
c4cffff92f apply shader changes from zesterer 2023-05-09 19:43:10 +02:00
Isse
1710dcc111 fix shadows 2023-05-09 19:43:09 +02:00
Isse
fcb7011cde sprites on volumes 2023-05-09 19:43:09 +02:00
Joshua Barretto
79dd1e2629 Fixed ambient lighting 2023-05-04 19:57:28 +01:00
Isse
1494d93fc8 fix cloud tearing 2023-04-19 22:46:35 +02:00
Isse
1442dd29f1 fix NaN issue in apply_point_glow_light 2023-04-19 21:14:19 +02:00
Isse
4b831f884e reduce the offset of clouds on the horizon 2023-04-19 21:01:30 +02:00
Imbris
b58a8a9ec3 Ensure in-world UI elements are snapped to pixel borders. 2023-04-13 00:10:12 -04:00
Samuel Keiffer
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
Tao In Way
e32460f9ee taoist&floppy/cyclops&dullahan 2023-04-12 22:53:38 +00:00
Joshua Barretto
efbab102a5 Make LoD towns glow 2023-04-09 19:25:58 +01:00
Imbris
5881e44e61 Address review on 3573 2023-04-08 02:19:14 -04:00
Imbris
2a9a63a60e Clippy fixes 2023-04-08 00:51:50 -04:00
Imbris
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
Imbris
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
Imbris
1d51aae3b2 Start attempt to premultiply alpha on the GPU. 2023-04-08 00:28:31 -04:00
Imbris
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
Imbris
69a1a661b6 fixes and tweaks (various minor changes related to UI image scaling on
GPU)
2023-04-08 00:28:31 -04:00
Imbris
d62bf8a790 init (scaling UI images during sampling on the GPU instead of on the CPU) 2023-04-08 00:28:28 -04:00
Joshua Barretto
9645172135 Slightly smoother FxUpscale 2023-04-01 18:06:20 +01:00
flo
bf81ffc029 frost_gigas 2023-02-15 00:10:37 +00:00
Joshua Barretto
75e07c04f0 Merge branch 'zesterer/glowing-sprites' into 'master'
Added support for glowing sprites

See merge request veloren/veloren!3771
2023-01-19 22:31:30 +00:00
Joshua Barretto
d9552f7ff4 Added support for glowing sprites 2023-01-19 21:59:02 +00:00
Avi Weinstock
aba6f6654e Add a new particle mode for potion sickness. 2023-01-19 15:06:14 -05:00
Joshua Barretto
c12e6426fa Fixed rain drop normals and wind direction for sprites 2023-01-15 19:13:18 +00:00
Isse
5378d1b11d Fix doors 2023-01-15 05:13:02 +00:00
Joshua Barretto
fc564f5313 Fixed internal water reflections and improved underwarper 2023-01-13 11:37:27 +00:00
Joshua Barretto
b127cff26c Merge branch 'zesterer/gbuffers-ssr' into 'master'
Use normal and material gbuffer to improve quality of SSR

See merge request veloren/veloren!3734
2023-01-12 20:26:41 +00:00
Joshua Barretto
49749c86a7 Made emissive figures behave correctly 2023-01-12 18:44:26 +00:00
Joshua Barretto
4d7526b920 Made point shadows with shadow mapping an experimental shader 2023-01-12 15:39:11 +00:00
Joshua Barretto
0bdc66b10a Addressed review comments, minor fixes 2023-01-12 15:30:13 +00:00
Joshua Barretto
0067825187 Reflection smearing 2022-12-31 19:19:52 +00:00
Joshua Barretto
f48e1ca951 Make wind sway change according to weather wind velocity 2022-12-31 17:40:40 +00:00
Joshua Barretto
1f2d56c032 Better reflections 2022-12-31 13:04:28 +00:00
Joshua Barretto
313527cf46 Correct material for LoD water 2022-12-30 19:22:07 +00:00
Joshua Barretto
6e344f58e8 Remove unnecessary cloud sampling from shiny water 2022-12-30 17:33:54 +00:00
Joshua Barretto
799bb17d75 Fixed underground sky blend test 2022-12-30 17:24:36 +00:00
Joshua Barretto
4bd7ec26d3 Fixed drop shadows 2022-12-30 17:01:26 +00:00
Joshua Barretto
367ec3e8f4 Added ViewMaterials experimental shader 2022-12-30 16:42:56 +00:00
Joshua Barretto
9098abc3d2 Merge reflections on horizontal border 2022-12-30 16:30:29 +00:00
Joshua Barretto
78fbaa82b3 Fixed ViewNormals 2022-12-30 16:26:32 +00:00
Joshua Barretto
c6fc833acb Don't blend sky for underwater reflections 2022-12-30 16:23:38 +00:00
Joshua Barretto
d50bda8d09 Better SSR sky blending 2022-12-30 16:01:06 +00:00
Joshua Barretto
26a98a3d9b Use normal and material gbuffer to improve quality of SSR 2022-12-30 15:33:23 +00:00
Joshua Barretto
dcc4762106 Fixed moon lighting of clouds 2022-12-17 15:04:57 +00:00
Joshua Barretto
5cf3aefb87 Better storm clouds 2022-12-17 14:57:55 +00:00