mirror of
https://codeberg.org/icewind/vbspview.git
synced 2026-06-03 18:24:09 +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"
|
||||
|
||||
[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" }
|
||||
vbsp = "0.5.0"
|
||||
miette = { version = "5.5.0", features = ["fancy"] }
|
||||
thiserror = "1.0.37"
|
||||
itertools = "0.12.0"
|
||||
vbsp = "0.6.0"
|
||||
miette = { version = "7.2.0", features = ["fancy"] }
|
||||
thiserror = "1.0.63"
|
||||
itertools = "0.13.0"
|
||||
vmdl = "0.2.0"
|
||||
tracing = "0.1.37"
|
||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||
tracing-tree = "0.3.0"
|
||||
tracing = "0.1.40"
|
||||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
||||
tracing-tree = "0.4.0"
|
||||
cgmath = "0.18.0"
|
||||
tf-demo-parser = "0.5.0"
|
||||
tf-demo-parser = "0.5.1"
|
||||
steamid-ng = "1.0.0"
|
||||
clap = { version = "4.0.29", features = ["derive"] }
|
||||
splines = { version = "4.1.1", features = ["cgmath"] }
|
||||
vtf = "0.1.6"
|
||||
vmt-parser = "0.1.1"
|
||||
image = "0.23.14"
|
||||
clap = { version = "4.5.16", features = ["derive"] }
|
||||
splines = { version = "4.3.1", features = ["cgmath"] }
|
||||
vtf = "0.3.0"
|
||||
vmt-parser = "0.2.0"
|
||||
image = "0.25.2"
|
||||
tf-asset-loader = { version = "0.1", features = ["bsp"] }
|
||||
rayon = "1.8.0"
|
||||
bytemuck = "1.14.0"
|
||||
rayon = "1.10.0"
|
||||
bytemuck = "1.17.1"
|
||||
texpresso = { version = "2.0.1", features = ["rayon"] }
|
||||
|
||||
[patch.crates-io]
|
||||
vbsp = { path = "../bsp" }
|
||||
vmdl = { path = "../vmdl" }
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 2
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::Error;
|
||||
use image::{DynamicImage, GenericImageView};
|
||||
use image::DynamicImage;
|
||||
use std::cell::RefCell;
|
||||
use tf_asset_loader::Loader;
|
||||
use three_d::{CpuMaterial, CpuTexture};
|
||||
|
|
@ -32,6 +32,7 @@ pub struct MaterialData {
|
|||
pub alpha_test: Option<f32>,
|
||||
pub bump_map: Option<TextureData>,
|
||||
pub translucent: bool,
|
||||
#[allow(dead_code)]
|
||||
pub transform: Option<TextureTransform>,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use cgmath::Matrix4;
|
||||
use crate::bsp::map_coords;
|
||||
use crate::material::{convert_material, load_material_fallback, MaterialSet};
|
||||
use crate::Error;
|
||||
use cgmath::SquareMatrix;
|
||||
use rayon::prelude::*;
|
||||
use tf_asset_loader::Loader;
|
||||
use three_d::{CpuMaterial, CpuModel, Mat4, Positions, Vec2, Vec3, Vec4};
|
||||
|
|
@ -11,7 +11,6 @@ use vbsp::PropPlacement;
|
|||
use vmdl::mdl::Mdl;
|
||||
use vmdl::vtx::Vtx;
|
||||
use vmdl::vvd::Vvd;
|
||||
use cgmath::SquareMatrix;
|
||||
|
||||
#[tracing::instrument(skip(loader))]
|
||||
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
|
||||
.vertices()
|
||||
.map(|vertex| model.vertex_to_world_space(vertex))
|
||||
.map(|vertex| model.apply_root_transform(vertex.position))
|
||||
.map(|vertex| map_coords(vertex))
|
||||
.collect();
|
||||
let normals: Vec<Vec3> = mesh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue