#mesh #wgpu #point-cloud #gpu-accelerated #voxel #nearest-neighbor #3d #registration #icp #euclidean

threecrate-gpu

GPU-accelerated algorithms for threecrate using wgpu

9 releases (breaking)

0.8.0 May 30, 2026
0.7.1 Apr 13, 2026
0.6.0 Feb 25, 2026
0.5.0 Sep 27, 2025
0.1.0 Jul 9, 2025

#9 in #euclidean


Used in 2 crates

MIT/Apache

300KB
6.5K SLoC

ThreeCrate GPU

Crates.io Documentation License

GPU-accelerated algorithms for 3D point cloud processing using wgpu.

Features

  • Filtering: GPU statistical outlier removal, radius filtering, voxel grid downsampling
  • Normal Estimation: Parallel GPU-based surface normal computation
  • Nearest Neighbor Search: GPU K-nearest and radius neighbor search
  • Segmentation: GPU-scored RANSAC plane segmentation and GPU-accelerated Euclidean clustering
  • ICP Registration: GPU-accelerated Iterative Closest Point
  • TSDF: Truncated Signed Distance Function volume integration and surface extraction
  • Rendering: Real-time point cloud and mesh rendering with PBR material support
  • Cross-platform: Vulkan, Metal, and DirectX 12 via wgpu

Usage

Add this to your Cargo.toml:

[dependencies]
threecrate-gpu = "0.6.0"
threecrate-core = { version = "0.6.0", features = ["gpu"] }

Example

use threecrate_gpu::{GpuContext, PointCloudRenderer, RenderConfig, point_cloud_to_vertices};
use threecrate_core::{PointCloud, Point3f};

// Initialize GPU context
let gpu_context = GpuContext::new().await?;

// GPU-accelerated filtering
let filtered = gpu_voxel_grid_filter(&gpu_context, &cloud, 0.05).await?;

// GPU RANSAC plane segmentation
let plane_config = GpuPlaneSegmentationConfig {
    max_iterations: 1000,
    distance_threshold: 0.01,
    min_inliers: 100,
};
let plane = gpu_segment_plane(&gpu_context, &cloud, plane_config).await?;

// GPU-accelerated Euclidean clustering
let cluster_config = GpuClusterConfig::new(0.02, 100, 25000);
let clusters = gpu_extract_clusters(&gpu_context, &cloud, cluster_config).await?;

// GPU ICP registration
let result = gpu_icp(&gpu_context, &source, &target).await?;

// TSDF volume integration
let mut volume = create_tsdf_volume(resolution, voxel_size);
gpu_tsdf_integrate(&gpu_context, &mut volume, &depth_image, &intrinsics, &pose).await?;
let mesh = gpu_tsdf_extract_surface(&gpu_context, &volume).await?;

// Real-time rendering
let config = RenderConfig::default();
let renderer = PointCloudRenderer::new(&window, config).await?;
let vertices = point_cloud_to_vertices(&cloud, [1.0, 1.0, 1.0], 4.0);
renderer.render(&vertices)?;

GPU Requirements

  • Vulkan: Preferred backend for best performance
  • Metal: macOS support via Metal API
  • DirectX 12: Windows support via DX12
  • OpenGL: Fallback support for older systems

License

This project is licensed under either of

at your option.

Dependencies

~29–65MB
~1M SLoC