Commit 10b291c 1 parent d581a40 commit 10b291c Copy full SHA for 10b291c
File tree 4 files changed +10
-5
lines changed
4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change
1
+ //! Library containing high-performance functions for the Gaussian Splats rendering process within CesiumJS.
2
+
1
3
pub mod models;
2
4
pub mod radix;
3
5
pub mod texture_gen;
4
6
7
+ use crate :: models:: TextureData ;
5
8
use js_sys:: { Float32Array , Uint32Array , Uint8Array } ;
6
9
use wasm_bindgen:: prelude:: * ;
7
- use crate :: models:: TextureData ;
8
10
9
11
/// Generate a splat texture from the given attributes.
10
12
///
@@ -21,7 +23,7 @@ pub fn generate_splat_texture(
21
23
}
22
24
23
25
/// Sorts the Gaussian Splats by depth using a radix sort.
24
- ///
26
+ ///
25
27
/// Wraps the [`radix::radix_sort_gaussians_indexes`] function for access from JavaScript.
26
28
#[ wasm_bindgen]
27
29
pub fn radix_sort_gaussians_indexes (
Original file line number Diff line number Diff line change
1
+ //! Radix sort implementation for sorting Gaussian Splats.
2
+
1
3
use js_sys:: { Float32Array , Uint32Array } ;
2
4
use wasm_bindgen:: prelude:: * ;
3
5
Original file line number Diff line number Diff line change
1
+ //! Generates textures for use within the Gaussian Splat shaders in CesiumJS.
2
+
3
+ use crate :: models:: TextureData ;
1
4
use js_sys:: { Float32Array , Uint8Array } ;
2
5
use wasm_bindgen:: prelude:: * ;
3
- use crate :: models:: TextureData ;
4
6
5
7
/// Converts a 32-bit float to a 16-bit integer.
6
8
fn float_to_half ( f : f32 ) -> i16 {
Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ fn test_radix_sort_gaussians_indexes() {
40
40
let count = test_data. get_count ( ) ;
41
41
let sorted_idx = test_data. get_sorted_idx ( ) ;
42
42
43
- let result =
44
- radix_sort_gaussians_indexes ( & positions, & model_view, count) . unwrap ( ) ;
43
+ let result = radix_sort_gaussians_indexes ( & positions, & model_view, count) . unwrap ( ) ;
45
44
46
45
check_uint32array ( & result, sorted_idx. as_ref ( ) ) . unwrap ( ) ;
47
46
}
You can’t perform that action at this time.
0 commit comments