mirror of
https://codeberg.org/icewind/vbspview.git
synced 2026-06-03 10:14:10 +02:00
updates
This commit is contained in:
parent
9689dbf7ae
commit
afdcd22965
4 changed files with 710 additions and 176 deletions
846
Cargo.lock
generated
846
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
36
Cargo.toml
36
Cargo.toml
|
|
@ -6,33 +6,29 @@ authors = ["Robin Appelman <robin@icewind.nl>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
three-d = { version = "0.16.3", features = ["egui-gui"] }
|
three-d = { version = "0.16.4", features = ["egui-gui"] }
|
||||||
three-d-asset = { version = "0.6" }
|
three-d-asset = { version = "0.6" }
|
||||||
vbsp = "0.5.0"
|
vbsp = "0.6.0"
|
||||||
miette = { version = "5.5.0", features = ["fancy"] }
|
miette = { version = "7.2.0", features = ["fancy"] }
|
||||||
thiserror = "1.0.37"
|
thiserror = "1.0.63"
|
||||||
itertools = "0.12.0"
|
itertools = "0.13.0"
|
||||||
vmdl = "0.2.0"
|
vmdl = "0.2.0"
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.40"
|
||||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
||||||
tracing-tree = "0.3.0"
|
tracing-tree = "0.4.0"
|
||||||
cgmath = "0.18.0"
|
cgmath = "0.18.0"
|
||||||
tf-demo-parser = "0.5.0"
|
tf-demo-parser = "0.5.1"
|
||||||
steamid-ng = "1.0.0"
|
steamid-ng = "1.0.0"
|
||||||
clap = { version = "4.0.29", features = ["derive"] }
|
clap = { version = "4.5.16", features = ["derive"] }
|
||||||
splines = { version = "4.1.1", features = ["cgmath"] }
|
splines = { version = "4.3.1", features = ["cgmath"] }
|
||||||
vtf = "0.1.6"
|
vtf = "0.3.0"
|
||||||
vmt-parser = "0.1.1"
|
vmt-parser = "0.2.0"
|
||||||
image = "0.23.14"
|
image = "0.25.2"
|
||||||
tf-asset-loader = { version = "0.1", features = ["bsp"] }
|
tf-asset-loader = { version = "0.1", features = ["bsp"] }
|
||||||
rayon = "1.8.0"
|
rayon = "1.10.0"
|
||||||
bytemuck = "1.14.0"
|
bytemuck = "1.17.1"
|
||||||
texpresso = { version = "2.0.1", features = ["rayon"] }
|
texpresso = { version = "2.0.1", features = ["rayon"] }
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
vbsp = { path = "../bsp" }
|
|
||||||
vmdl = { path = "../vmdl" }
|
|
||||||
|
|
||||||
[profile.dev.package."*"]
|
[profile.dev.package."*"]
|
||||||
opt-level = 2
|
opt-level = 2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::Error;
|
use crate::Error;
|
||||||
use image::{DynamicImage, GenericImageView};
|
use image::DynamicImage;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use tf_asset_loader::Loader;
|
use tf_asset_loader::Loader;
|
||||||
use three_d::{CpuMaterial, CpuTexture};
|
use three_d::{CpuMaterial, CpuTexture};
|
||||||
|
|
@ -32,6 +32,7 @@ pub struct MaterialData {
|
||||||
pub alpha_test: Option<f32>,
|
pub alpha_test: Option<f32>,
|
||||||
pub bump_map: Option<TextureData>,
|
pub bump_map: Option<TextureData>,
|
||||||
pub translucent: bool,
|
pub translucent: bool,
|
||||||
|
#[allow(dead_code)]
|
||||||
pub transform: Option<TextureTransform>,
|
pub transform: Option<TextureTransform>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use cgmath::Matrix4;
|
|
||||||
use crate::bsp::map_coords;
|
use crate::bsp::map_coords;
|
||||||
use crate::material::{convert_material, load_material_fallback, MaterialSet};
|
use crate::material::{convert_material, load_material_fallback, MaterialSet};
|
||||||
use crate::Error;
|
use crate::Error;
|
||||||
|
use cgmath::SquareMatrix;
|
||||||
use rayon::prelude::*;
|
use rayon::prelude::*;
|
||||||
use tf_asset_loader::Loader;
|
use tf_asset_loader::Loader;
|
||||||
use three_d::{CpuMaterial, CpuModel, Mat4, Positions, Vec2, Vec3, Vec4};
|
use three_d::{CpuMaterial, CpuModel, Mat4, Positions, Vec2, Vec3, Vec4};
|
||||||
|
|
@ -11,7 +11,6 @@ use vbsp::PropPlacement;
|
||||||
use vmdl::mdl::Mdl;
|
use vmdl::mdl::Mdl;
|
||||||
use vmdl::vtx::Vtx;
|
use vmdl::vtx::Vtx;
|
||||||
use vmdl::vvd::Vvd;
|
use vmdl::vvd::Vvd;
|
||||||
use cgmath::SquareMatrix;
|
|
||||||
|
|
||||||
#[tracing::instrument(skip(loader))]
|
#[tracing::instrument(skip(loader))]
|
||||||
pub fn load_prop(loader: &Loader, name: &str) -> Result<vmdl::Model, Error> {
|
pub fn load_prop(loader: &Loader, name: &str) -> Result<vmdl::Model, Error> {
|
||||||
|
|
@ -109,7 +108,7 @@ fn prop_to_meshes<'a>(
|
||||||
|
|
||||||
let positions: Vec<Vec3> = mesh
|
let positions: Vec<Vec3> = mesh
|
||||||
.vertices()
|
.vertices()
|
||||||
.map(|vertex| model.vertex_to_world_space(vertex))
|
.map(|vertex| model.apply_root_transform(vertex.position))
|
||||||
.map(|vertex| map_coords(vertex))
|
.map(|vertex| map_coords(vertex))
|
||||||
.collect();
|
.collect();
|
||||||
let normals: Vec<Vec3> = mesh
|
let normals: Vec<Vec3> = mesh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue