Repository navigation
Releases
Releases · Filyus/draco-rust
draco-gltf 0.11.1
API
- Opt-in Float32 rotation quantization for Gaussian splats.
GaussianSplatQuantizationaddsrotation_bits: Option<u8>(1..=30).
None(the default) continues to store Float32KHR_gaussian_splatting:ROTATION
without quantization; settingrotation_bitsquantizes it and allows explicit
KD-tree encoding on that cloud.
glTF
- Default Gaussian splat
POINTSto sequential encoding. In auto mode
(encoding_method == 0),POINTSprimitives carrying
KHR_gaussian_splatting:*attributes now choose the sequential point-cloud
coder instead of letting KD-tree inflate multi-attribute splat payloads when
all attributes are integer or quantized. Explicit KD-tree (encoding_method == 2)
remains available when all attributes are compatible.
draco-gltf 0.11.0
API
- Gaussian splat quantization now has independent controls for Float32 scale,
opacity, and spherical harmonics (SH), with SH rules configurable by degree
or coefficient. Explicit grids are supported, including a centered grid that
preserves exact zero. Rotation quaternions and integer splat attributes
retain their input precision. With Float32 rotation, automatic encoding uses
the sequential method and an explicit KD-tree request is rejected.
Point-cloud compression remains opt-in viaallow_points.
Fixes
- Quantized Float32 opacity uses the observed range for values within
[0, 1]
when rounding keeps the decoded maximum in range, preserving distinctions in
narrow ranges. If values fall outside[0, 1]or rounding would decode
opacity above 1, encoding uses a fixed[0, 1]grid. - SH coefficient names must use a single ASCII digit for each placeholder in
SH_DEGREE_<l>_COEF_<n>, with degree 0–3 and coefficient index 0–2×degree. A
malformed name such asSH_DEGREE_01_COEF_00is rejected instead of aliasing
SH_DEGREE_1_COEF_0.
draco-core 2.5.1
Core codec
- Avoid KD-tree bloat on high-dimensional point clouds. Automatic
point-cloud method selection inPointCloudEncodernow caps KD-tree
selection at 12 total components across all attributes, falling back to
sequential encoding for wider clouds such as Gaussian splats where KD-tree's
shared bit depth inflates stream size. Standard clouds up to 12 components
keep the existing C++ parity default, and explicit
EncoderOptions::set_encoding_method(1)still forces KD-tree.
draco-gltf 0.10.0
API
- Breaking: Construct
CompressionOptionsfrom its default. The struct
is now#[non_exhaustive]and addsposition_quantization_grid, so callers
outside the crate can no longer use struct literals, including those with
..Default::default(). Set fields afterCompressionOptions::default().
UsePositionQuantizationGridwithQuantizationBits::positionwhen
separately encoded primitives need a shared POSITION grid. - Preserve
KHR_animation_pointerduring Draco-only compression. Targets
to stable document properties are retained; pointers into/accessors,
/bufferViews, or/buffersare rejected because compression compacts
those collections.AnimationPointerExtensionandKHR_ANIMATION_POINTER
are publicly re-exported for extension registries.
draco-core 2.5.0
Added
- Keep quantized data for custom rendering.
MeshDecoder::set_skip_attribute_transformand
PointCloudDecoder::set_skip_attribute_transformleave selected positions
or normals in integer form;PointAttribute::attribute_transform_data()
exposes the parameters. A custom renderer can apply the inverse transform in
a shader instead of converting the values to floats during decoding. - Keep separately encoded chunks on one position grid.
EncoderOptions::set_attribute_grid_quantizationtakes a world-space
spacing; use the same spacing for each tile so its quantization levels share
a coordinate lattice and reduce seams caused by per-chunk grids. - Find which sections consume the compressed bytes.
MeshEncoder::encode_with_infoand
PointCloudEncoder::encoded_point_cloud_inforeport header and metadata,
mesh connectivity, per-attribute or joint point-cloud payload, and transform
sizes. Use this to see where bytes go when tuning a storage or network
budget.
draco-gltf 0.9.0
API
- Breaking:
CompressionOptionsadds the publicallow_pointsfield;
callers constructing it with a struct literal must initialize the new field.
Enabling it compresses glTFPOINTSprimitives through Draco's point-cloud
encoder. Point ordering and prediction options are available; point-cloud
compression remains opt-in, and primitives with morph targets are not
supported on this path. - Read the
KHR_gaussian_splattingattributes as generic Draco geometry
attributes, with the extension's component types and shapes validated.
draco-core 2.4.0
Added
- Explicit quantization grids.
EncoderOptionscan set an attribute's
quantization bits, origin and range, allowing separate encodes to share a
grid. Values outside the grid are clamped to its edges. Invalid grids and
non-finite source values are rejected.
draco-gltf 0.8.1
Safety and Hardening
- Reject meshopt triangle streams that read unwritten FIFO entries, malformed
codeaux tables, or unterminated index varints. Reject reserved vertex channel
modes and reserved channel bits in attribute streams.
draco-gltf 0.8.0
API
- Breaking:
Gltf21Draftnow follows the pinned specification's accessor
and attribute tables. Strict document validation and primitive reads and
writes reject proposedi32,f16,f64,i64, andu64storage
and non-consecutive core attribute indices. The data model still represents
these component codes and preserves their original JSON. PackedGeometry::newchecks structure and attribute dimensions.
validate(profile)additionally checks core formats, whileImport
operations account for extensions declared by their document.- Add
DracoPrimitiveContract::with_mesh_quantizationfor hosts supplying
their own document model, andGeometryError::InvalidAttributeSemantic
for malformed or non-consecutive attribute indices.
glTF
- Fix rejection of normalized signed byte and short normals when
KHR_mesh_quantizationis required. Ordinary and Draco primitive reads
and raw writes accept the extension's attribute formats. Fixes
#3. - Raw writes align individual attribute elements and retain stored-value
POSITIONbounds.Import::from_geometrydeclares
KHR_mesh_quantizationwhen its geometry requires it. - Resolve GLB v3 buffer references to any plain chunk type, read buffer
prefixes shorter than their chunks, and skip unused encoded chunks.
Inspection exposes encoding metadata and payload loading checks it.
Write GLB v3 alignment padding outside chunk lengths.
Compatibility
- Update the glTF 2.1 draft snapshot to
fab13e27. Validation checks
indexed semantic syntax, asset versions and minimum versions, mesh shape
structure, and external-asset MIME types against this snapshot.
draco-io 0.6.1
Changed
- The PLY loss report identifies position conversions that may lose
precision.position_conversions()lists the affected components and
their declared and destination types separately from dropped properties.
The report inspects the header, so an individual value may still be exact.
is_lossless()is false when the header cannot guarantee exact conversion.
The non-uint8 color error also names the property and the type it found. - Mixed PLY coordinate types no longer depend on property order. The
position attribute remains int32 when an int32 component is combined with
smaller integers. A floating or uint32 component selects float32 for all
coordinates; possible rounding is listed inposition_conversions().