18 breaking releases

0.19.0 Apr 3, 2025
0.18.0 Mar 6, 2025
0.17.0 Jan 28, 2025
0.15.0 Nov 27, 2024
0.2.0 Nov 22, 2023

#634 in Graphics APIs

Download history 59/week @ 2025-01-29 8/week @ 2025-02-05 9/week @ 2025-02-19 130/week @ 2025-03-05 2/week @ 2025-03-12 129/week @ 2025-04-02 6/week @ 2025-04-09 3/week @ 2025-04-16 10/week @ 2025-05-07 74/week @ 2025-05-14

84 downloads per month

MIT license

1.5MB
29K SLoC

xc3_wgpu

A Xenoblade Chronicles model rendering library.

Xenoblade 1 DE, Xenoblade 2, and Xenoblade 3 are all supported with Xenoblade 1 DE receiving the least testing.

Getting Started

The first step is to initialize an [Renderer]. This only needs to be done once since the renderer can be updated using methods as screen size and parameters change. The initial size should match the current window dimensions.

Models and maps are all loaded from the same [xc3_model] types. The shader database is optional but will improve rendering accuracy.

In each frame, render the [ModelGroup] using Renderer::render_models.

use xc3_wgpu::{MonolibShaderTextures, Renderer};
use xc3_model::shader_database::ShaderDatabase;

let monolib_shader = MonolibShaderTextures::from_file(&device, &queue, "monolib/shader");
let renderer = Renderer::new(&device, &queue, 1920, 1080, wgpu::TextureFormat::Bgra8Unorm, &monolib_shader);

let database = ShaderDatabase::from_file("xc3.bin")?;

let root = xc3_model::load_model("ch01011013.wimdo", Some(&database))?;
let groups = xc3_wgpu::load_model(&device, &queue, &[root], &monolib_shader);

let roots = xc3_model::load_map("ma59a.wismhd", Some(&database))?;
let groups = xc3_wgpu::load_map(&device, &queue, &roots, &monolib_shader);

Animation

Skeletal animations should use ModelGroup::update_bone_transforms and the Animation type from [xc3_model].


xc3_wgpu

A Xenoblade Chronicles model rendering library using xc3_model and wgpu.

Dependencies

~32–65MB
~896K SLoC