Changelog
Release notes summarized from the upstream tags and release commits. The full history is on GitHub; tagged releases are listed under tags.
v0.11.0 (2026-11-29): 16-bit rotations, billboards, full-range math.h, GCC 15.2 GAINZ
Section titled “v0.11.0 (2026-11-29): 16-bit rotations, billboards, full-range math.h, GCC 15.2 GAINZ”Full notes, with every benchmark table: v0.11.0 on GitHub. Every benchmark for this release is on the Benchmarks page.
- GAINZ: 107 routines faster than v0.10.0, measured on a Dreamcast with GCC 15.2.0 and stock KallistiOS flags: −4306 cycles cached and −8949 uncached in total. Highlights:
shz_fminf()/shz_fmaxf()/shz_clampf()/shz_saturatef()5.5–8.7× (they called newlib without-ffast-math),shz_memset8()1.94× cached and 3.68× uncached, the XMTRX and mat4x4 Euler and 16-bit rotations up to 2.1×,shz_quat_to_angles_*()1.33–1.44×,shz_xmtrx_init_rotation_quat()1.98×,shz_vec4_sqrtf()2.11×. - Scalar:
shz_expm1f(),shz_log1pf(),shz_logbf(),shz_ldexpf(),shz_scalbnf(),shz_erff(),shz_sqrtf_fsrra_safe()andshz_opaquef(). Every<math.h>replacement (truncf,floorf,ceilf,roundf,fractf,fmodf,remainderf,remquof,wrapf,hypotf,pow2f, ...) is now correct across the full float range.shz_sqrtf()is a single FSQRT. - Trigonometry: new Gamma group with
shz_lgammaf()andshz_tgammaf().shz_asinf(),shz_acosf()andshz_atan2f()are far more accurate (8e-6 and 1.4e-5 rad), withSHZ_ATAN2F_TERMSto pick the polynomial length. - Vector:
shz_vec3_rotate_xyz/zyx/zxy/yxz(),shz_vec3_rotate(),shz_vec3_rotate_dir()and 16-bit angle versions of every vector rotation;reject_safe(),bisector(),half_angle(),divf(),divf_fsrra(),div_fsrra(),inv_fsrra()andsqrtf_fsrra()for every vector size; aliasing-safe vector types.shz_vec3_reject()and the newshz_vec2_reject()/shz_vec4_reject()no longer guard against a zero vector. - Quaternion:
shz_quat_load_wxyz(),shz_quat_load_xyzw(),shz_quat_store_wxyz(),shz_quat_store_xyzw()and the aliasing helpers. The C++from_rotation_*_u16()wrappers are deprecated in favor ofuint16_toverloads. - XMTRX: 16-bit angle initializers and rotations, direction rotations (
init_rotation_x_yz/y_xz/z_xy(),rotate_x_yz/y_xz/z_xy()), axial billboards, non-mutating transpose transforms,shz_xmtrx_get_rotation()andshz_xmtrx_store_aligned32_4x4(). The C++ rotations also takedoubleradians. - Matrix: the same 16-bit rotations, direction rotations and billboards, plus
shz_mat4x4_get_rotation(). Theinit_*routines andshz_mat4x4_swap()no longer clobber XMTRX.shz_mat4x4_3x3_*()renamed toshz_mat4x4_*_3x3(); the old names are deprecated. - Fixes:
shz_xmtrx_lookat()/shz_mat4x4_lookat()corrupted perspective projections;shz_mat4x4_determinant()/inverse()and XMTRX add/sub were wrong; stack-safety fixes in several memory, matrix and XMTRX routines;shz_memcpy8()crash on GCC 14;shz_memset8()with-mdalign;<threads.h>no longer required;shz_vec3_barycenter()could read uninitialized FIPR lanes. - Platforms: validated on GCC 15.2, 16.2 and 17 on hardware; Clang builds with zero warnings; new
shz_backend_linked().
v0.10.0 (2026-10-25): XMTRX transform GAINZ, API coverage, deprecations
Section titled “v0.10.0 (2026-10-25): XMTRX transform GAINZ, API coverage, deprecations”Full notes: v0.10.0 on GitHub.
-
GAINZ:
shz_powf()1.97×,shz_log2f()1.61×, the inverse hyperbolic trig functions 1.40–1.48×,shz_xmtrx_rotate_x/y/z()1.49–1.50× (up to 2.33× uncached),shz_xmtrx_scale()andshz_xmtrx_translate()1.50–1.55×, most complex routines 1.1–1.3×, andshz_memcpy()up to 1.85× for misaligned copies. -
New:
shz_powif(),shz_quat_from_rotation_*()and their 16-bit versions,shz_quat_to_angles_zyx/zxy/yxz(),shz_xmtrx_rotate_dir(),shz_xmtrx_invert_rigid(),shz_xmtrx_trace_*(),shz_xmtrx_blend_3x4/4x3()for skinning,shz_mat4x4_inverse_rigid(), adjugates, and the vectorsqrtf(),inv_sqrtf()andnormalize_or()routines. -
Documentation site at sh4zam.com, generated from the headers.
-
Initial Cell Broadband Engine SPU back-end (
SHZ_BACKEND=SHZ_SPU), vector routines only, added to CMake and toSHZ_TLS_MODELauto-detection. -
shz_vec_inv_sqrtf()andshz_vec_sqrtf()added to the type-generic routines and the C++ wrappers. -
XMTRX,
shz_fmodf()andshz_memcpyN()bug fixes; fixes toload_apply_store_4x4andstore_aligned32_4x4. -
Build fixes for the KOS + SH toolchain stable versions and for Clang.
-
shz_xmtrx_apply_translation(),shz_mat4x4_apply_translation()and their C++ wrappers renamed toshz_xmtrx_add_translation(),shz_mat4x4_add_translation(),shz::xmtrx::add_translation()andshz::mat4x4::add_translation(); the old names are deprecated and forward to the new ones. -
shz_xmtrx_apply_scale(),shz_mat4x4_apply_scale()and their C++ wrappers renamed toshz_xmtrx_scale_3x3(),shz_mat4x4_scale_3x3(),shz::xmtrx::scale_3x3()andshz::mat4x4::scale_3x3(); the old names are deprecated and forward to the new ones. -
shz_mat4x4_3x3_scale(),shz_mat4x4_3x3_adjugate(),shz_mat4x4_3x3_inverse()andshz_mat4x4_3x3_determinant()renamed toshz_mat4x4_scale_3x3(),shz_mat4x4_adjugate_3x3(),shz_mat4x4_inverse_3x3()andshz_mat4x4_determinant_3x3(); the old names are deprecated and forward to the new ones. -
XMTRX and mat4x4 GL-style transforms dropped their
apply_prefix:apply_rotation_quat→rotate_quat,apply_lookat→lookat,apply_ortho→ortho,apply_frustum→frustum,apply_perspective→perspective,apply_screen→screen,apply_symmetric_skew→skew_symmetricandapply_permutation_*→permute_*, in both the C and C++ APIs; the old names are deprecated and forward to the new ones. -
shz_mat4x4_permute_wzyx()andshz::mat4x4::permute_wzyx()added, matching XMTRX. -
shz::mat4x4::apply_rotation(const quat&)renamed toshz::mat4x4::rotate(const quat&); the old overload is deprecated. -
Back-end routines renamed to match their public names, and every deprecated routine moved into a
Deprecatedsection at the end of its API's documentation. -
The C++ API now supports C++17, with extra features for C++20 and C++23. C++23-only features stay behind
SHZ_CPP23, andSHZ_CPP20is defined for C++20 builds.shz::vecN::normalize(),normalize_safe()andnormalize_or()no longer fail with an ambiguous assignment below C++23, andshz_complex.hppincluded on its own now enables its C++23 features. -
The documented C requirement is now C11 (previously stated as C17), with GNU extensions required.
v0.9.1 (2026-09-25): XMTRX gainz, bug fixes, SW back-end on SH4
Section titled “v0.9.1 (2026-09-25): XMTRX gainz, bug fixes, SW back-end on SH4”- CMake: a configuration option chooses the back-end rather than deciding by architecture. The software back-end is now built for all targets, so a Dreamcast project can switch between the accelerated and software back-ends without rebuilding
libsh4zam.a. - Makefile:
SHZ_BACKENDvariable to pick the SW or SH4 back-end. - XMTRX: faster SH4 versions of
load_transpose_3x3,load_2x2,store_3x3,store_transpose_3x3,init_one,init_rotation_x/y/z,apply_translation,apply_scale,apply_rotation_xandinit_screen. Software back-end fixes inapply_3x3,apply_transpose_3x3,apply_rotation_x/y/z,apply_rotation,apply_rotation_quatandrotate. New C++ wrappers for loading, storing and applying 2x2 and 3x3 matrices. - Memory:
shz_sq_memcpy32()andshz_sq_memcpy32_1()software versions now work on real Dreamcast store queues. - cdefs:
SHZ_TARGETis decoupled fromSHZ_BACKEND, since any target can use either back-end; every major architecture is auto-detected as a target.-m4and-m4-double-onlySH4 builds are supported (with the software back-end). - Tests: benchmark gainz reported for the SW back-end too; coverage for every newly wrapped C++ routine and every routine that had a bug.
v0.9.0 (2026-09-22): XMTRX 3x4 API expansion
Section titled “v0.9.0 (2026-09-22): XMTRX 3x4 API expansion”- XMTRX 3x4 API for C and C++ on both back-ends:
shz_xmtrx_load_transpose_3x4(),shz_xmtrx_store_transpose_3x4(),shz_xmtrx_apply_transpose_3x4(),shz_xmtrx_apply_reverse_3x4(),shz_xmtrx_apply_reverse_transpose_3x4()and the fusedshz_xmtrx_load_apply_3x4(). - The C++ API covers the whole 3x4 family.
- Faster SH4
shz_xmtrx_get_scale(),shz_mat4x4_get_scale()(also fixing a real bug for non-affine matrices) andshz_mat4x4_transform_vec3(), which is now hand-writtenFIPRassembly. - More stable benchmark harness.
v0.8.1 (2026-09-20)
Section titled “v0.8.1 (2026-09-20)”- One-off rotations of a single 3D vector about the X, Y and Z axes:
shz_vec3_rotate_x(),shz_vec3_rotate_y(),shz_vec3_rotate_z()(andshz::vec3::rotate_x()etc.), faster than going through XMTRX for a single rotation. - Resources page additions, including the deep-dive into
FSCA,FSRRA,FTRVandFIPR.
v0.8.0 (2026-08-18)
Section titled “v0.8.0 (2026-08-18)”"We're WAY overdue for a minor release." Lots of new features, many bug fixes for both back-ends, and no known regressions. Upstream recommends it as a stable tag to stay on before the 1.0 API.
v0.7.0 (2026-05-24)
Section titled “v0.7.0 (2026-05-24)”Fix for software back-end unit test builds.