veloren/voxygen/Cargo.toml
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

170 lines
6.3 KiB
TOML

[package]
authors = ["Joshua Barretto <joshua.s.barretto@gmail.com>", "Imbris <imbrisf@gmail.com>"]
default-run = "veloren-voxygen"
edition = "2021"
name = "veloren-voxygen"
version = "0.14.0"
# Cargo thinks it should build the voxygen binary even when a specific bench is specified for building
# Uncomment below and comment out default-run if you want to avoid this
# autobins = false
[package.metadata.nix]
build = true
app = true
desktopFile = "./assets/voxygen/net.veloren.veloren.desktop"
longDescription = """
Veloren is a multiplayer voxel RPG written in Rust.
It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.
This package includes the official client, Voxygen.
"""
[features]
hot-anim = ["anim/use-dyn-lib"]
hot-egui = ["voxygen-egui/use-dyn-lib", "egui"]
hot-reloading = ["common/hot-reloading"]
singleplayer = ["server"]
simd = ["vek/platform_intrinsics"]
tracy = ["profiling", "profiling/profile-with-tracy", "common-frontend/tracy", "client/tracy"]
tracy-memory = ["tracy"] # enables heap profiling with tracy
plugins = ["client/plugins"]
egui-ui = ["voxygen-egui", "egui", "egui_wgpu_backend", "egui_winit_platform"]
shaderc-from-source = ["shaderc/build-from-source"]
discord = ["discord-sdk"]
bin_img-export = ["common-assets"]
# We don't ship egui with published release builds so a separate feature is required that excludes it.
default-publish = ["singleplayer", "native-dialog", "plugins", "discord", "simd"]
# Temp for bug on current wgpu version that has access violation in vulkan when constructing egui pipeline
default-no-egui = ["default-publish", "hot-reloading", "shaderc-from-source"]
default = ["default-no-egui", "egui-ui"]
[dependencies]
client = {package = "veloren-client", path = "../client"}
common = {package = "veloren-common", path = "../common"}
common-assets = {package = "veloren-common-assets", path = "../common/assets", optional = true} # img-export
common-base = {package = "veloren-common-base", path = "../common/base"}
common-ecs = {package = "veloren-common-ecs", path = "../common/ecs"}
common-frontend = {package = "veloren-common-frontend", path = "../common/frontend"}
common-net = {package = "veloren-common-net", path = "../common/net"}
common-state = {package = "veloren-common-state", path = "../common/state"}
common-systems = {package = "veloren-common-systems", path = "../common/systems"}
anim = {package = "veloren-voxygen-anim", path = "anim"}
i18n = {package = "veloren-client-i18n", path = "../client/i18n"}
i18n-helpers = {package = "veloren-voxygen-i18n-helpers", path = "i18n-helpers"}
voxygen-egui = {package = "veloren-voxygen-egui", path = "egui", optional = true }
# Graphics
winit = {version = "0.25.0", features = ["serde"]}
wgpu = { version = "=0.8.0", features = ["trace", "cross"] }
wgpu-profiler = { git = "https://github.com/Imberflur/wgpu-profiler", tag = "wgpu-0.8" }
bytemuck = { version="1.4", features=["derive"] }
# shaderc = "0.8.0"
# Working around a current bug in shaderc that causes it to use the system installation even if we specify compile from source
shaderc = { git = "https://github.com/pythonesque/shaderc-rs", rev = "f2605a02062834019bedff911aee2fd2998c49f9" }
# cmake crate used by shaderc, newer version 0.1.46 uses a new cmake command that is not available in our CI cmake version
# see https://github.com/alexcrichton/cmake-rs/issues/131
cmake = "=0.1.45"
# Ui
conrod_core = {git = "https://gitlab.com/veloren/conrod.git", branch="copypasta_0.7"}
conrod_winit = {git = "https://gitlab.com/veloren/conrod.git", branch="copypasta_0.7"}
euc = "0.5.0"
iced = {package = "iced_native", git = "https://github.com/Imberflur/iced", tag = "winit-0.25"}
iced_winit = {git = "https://github.com/Imberflur/iced", tag = "winit-0.25"}
window_clipboard = "0.2"
glyph_brush = "0.7.0"
keyboard-keynames = "0.1.2"
# EGUI
egui = {version = "0.12", optional = true }
egui_wgpu_backend = {git = "https://github.com/hasenbanck/egui_wgpu_backend.git", rev = "63a002c6a9b6c016e45806dd065864431caab621", optional = true }
egui_winit_platform = {version = "0.8", optional = true }
# ECS
specs = { version = "0.18", features = ["serde", "storage-event-control", "derive"] }
# Mathematics
vek = {version = "0.15.8", features = ["serde"]}
levenshtein = "1.0.5"
# Controller
gilrs = {version = "0.10.0", features = ["serde-serialize"]}
# Singleplayer
server = { package = "veloren-server", path = "../server", optional = true, default-features = false, features = ["worldgen"] }
# CLI
clap = { version = "3.2.20", features = ["derive"] }
# Utility
assets_manager = {version = "0.9", features = ["ab_glyph"]}
backtrace = "0.3.40"
bincode = "1.3.1"
chrono = { version = "0.4.22", features = ["serde"] }
chumsky = "0.8"
cpal = "0.14"
copy_dir = "0.1.2"
crossbeam-utils = "0.8.1"
crossbeam-channel = "0.5"
# TODO: remove
directories-next = "2.0"
dot_vox = "5.1"
enum-iterator = "1.1.0"
guillotiere = "0.6.2"
etagere = "0.2.7"
hashbrown = {version = "0.12", features = ["rayon", "serde", "nightly"]}
image = {version = "0.24", default-features = false, features = ["ico", "png"]}
lazy_static = "1.4.0"
native-dialog = { version = "0.6.3", optional = true }
num = "0.4"
ordered-float = { version = "3", default-features = false }
rand = "0.8"
rand_chacha = "0.3"
rayon = "1.5"
rodio = {version = "0.15", default-features = false, features = ["vorbis"]}
ron = {version = "0.8", default-features = false}
serde = {version = "1.0", features = [ "rc", "derive" ]}
slab = "0.4.2"
strum = { version = "0.24", features = ["derive"] }
treeculler = "0.2"
tokio = { version = "1.14", default-features = false, features = ["rt-multi-thread"] }
num_cpus = "1.0"
# vec_map = { version = "0.8.2" }
inline_tweak = "1.0.2"
itertools = "0.10.0"
# Tracy
tracing = "0.1"
profiling = { version = "1.0.6", default-features = false, optional = true }
# Discord RPC
discord-sdk = { version = "0.3.0", optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
dispatch = "0.1.4"
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
[target.'cfg(windows)'.dependencies]
mimalloc = "0.1.29"
# Mumble
[target.'cfg(not(target_os="macos"))'.dependencies]
mumble-link = "0.1.0"
[dev-dependencies]
criterion = "0.3"
world = {package = "veloren-world", path = "../world"}
rayon = "1.5.0"
[[bench]]
harness = false
name = "meshing_benchmark"
[[bin]]
name = "img-export"
required-features = ["bin_img-export"]