Myth is a high-performance 3D rendering engine built in Rust, designed for developers seeking simplicity and efficiency. It combines the power of wgpu with a user-friendly approach, offering a cross-platform solution that runs seamlessly across native platforms and the web. This engine reduces boilerplate while maintaining performance, making graphics development accessible.
Myth is a high-performance 3D rendering engine developed in Rust, designed to provide a developer-friendly experience. Leveraging the capabilities of wgpu, Myth is engineered to simplify the complexities often associated with rendering while maintaining outstanding performance.
The core architecture of Myth leverages a strict SSA-based Render Graph that enhances its performance through:
For those interested in visualizing the underlying processes of Myth, a detailed RenderGraph topology illustrates how the engine manages complex rendering tasks while optimizing performance.
Experience the capabilities of Myth through browser-based applications:
Integrating Myth into a Rust project is straightforward. Below is a simple Rust example demonstrating how to create a basic application with a spinning cube:
use myth::prelude::*;
struct MyApp;
impl AppHandler for MyApp {
fn init(engine: &mut Engine, _: &dyn Window) -> Self {
let scene = engine.scene_manager.create_active();
let tex_handle = engine.assets.checkerboard(512, 64);
let mesh_handle = scene.spawn_box(
1.0, 1.0, 1.0,
PhongMaterial::new(Vec4::new(1.0, 0.76, 0.33, 1.0)).with_map(tex_handle),
&engine.assets,
);
let cam_node_id = scene.add_camera(Camera::new_perspective(45.0, 1280.0 / 720.0, 0.1));
scene.node(&cam_node_id).set_position(0.0, 0.0, 5.0).look_at(Vec3::ZERO);
scene.active_camera = Some(cam_node_id);
scene.add_light(Light::new_directional(Vec3::ONE, 5.0));
scene.on_update(move |scene, _input, _dt| {
if let Some(node) = scene.get_node_mut(mesh_handle) {
let rot_y = Quat::from_rotation_y(0.02);
let rot_x = Quat::from_rotation_x(0.01);
node.transform.rotation = node.transform.rotation * rot_y * rot_x;
}
});
Self {}
}
}
fn main() -> myth::Result<()> {
App::new().with_title("Myth-Engine Demo").run::<MyApp>()
}
With its emphasis on performance and usability, Myth is an innovative solution for developers seeking an efficient rendering engine that bridges the gap between low-level graphics programming and high-level game development.
No comments yet.
Sign in to be the first to comment.