Use psx-gte for matrix transforms, projection and lighting through the Geometry Transformation Engine. On PS1, it emits COP2 operations; on a host, the same wrappers use a software GTE.
How the crate is organized
regs and the exported register macros move data to and from COP2. ops wraps individual GTE commands. scene provides setup and projection helpers, while math, transform and lighting expose higher-level types and operations. The host backend is available only on non-MIPS targets; use its separate API reference below.
Integration notes
Low-level operations assume that the caller loaded the required input registers. Preserve the documented fixed-point units: screen offsets, matrix coefficients, positions and angle constructors do not all use the same scale. The 256-unit rotation helpers and the interpolated 4096-unit helpers are distinct APIs.
Start with projecting a cube and the complete hello-gte source. Projection alone does not implement clipping or visibility handling.
API, dependencies and source structure
SDK revision f2fec1c301f1. Structure, dependencies and features below come from this revision.
The PS1 reference includes all Cargo features. The manifest below shows which features are enabled by default.
Dependencies
psx-gte-core: all targetspsx-hw(shared repository crate): all targets
Cargo features
This crate declares no Cargo features.
Read the complete manifest and feature comments.
Source layout
The list includes internal implementation and test files. Public modules, types, functions and their signatures are indexed in the API reference above.
9 source and manifest files
Cargo.tomlsrc/host.rs: Host-side GTE shim.src/lib.rs: GTE (COP2) access -- PS1 Geometry Transformation Engine.src/lighting.rs: Up-to-3-directional-light rig, rendered via the GTE'ssrc/math.rs: Fixed-point math types for GTE inputs/outputs.src/ops.rs: GTE function-op wrappers.src/regs.rs: GTE register accessors.src/scene.rs: Scene / camera / projection helpers.src/transform.rs: Composable 3D transform math.