diff --git a/src/render/gaussian.wgsl b/src/render/gaussian.wgsl index 3d4c271f..984def47 100644 --- a/src/render/gaussian.wgsl +++ b/src/render/gaussian.wgsl @@ -15,15 +15,18 @@ get_rotation_matrix, get_scale_matrix, } +#import bevy_gaussian_splatting::transform::{ + world_to_clip, + in_frustum, +} + +#ifdef GAUSSIAN_SURFEL #import bevy_gaussian_splatting::surfel::{ compute_cov2d_surfel, get_bounding_box_cov2d, surfel_fragment_power, } -#import bevy_gaussian_splatting::transform::{ - world_to_clip, - in_frustum, -} +#endif #ifdef PACKED #ifdef PRECOMPUTE_COVARIANCE_3D diff --git a/src/render/surfel.wgsl b/src/render/surfel.wgsl index 698639c3..8f68b7ab 100644 --- a/src/render/surfel.wgsl +++ b/src/render/surfel.wgsl @@ -1,5 +1,7 @@ #define_import_path bevy_gaussian_splatting::surfel + +#ifdef GAUSSIAN_SURFEL #import bevy_gaussian_splatting::bindings::{ view, gaussian_uniforms, @@ -11,15 +13,6 @@ } #ifdef PACKED -#ifdef PRECOMPUTE_COVARIANCE_3D -#import bevy_gaussian_splatting::packed::{ - get_position, - get_color, - get_visibility, - get_opacity, - get_cov3d, -} -#else #import bevy_gaussian_splatting::packed::{ get_position, get_color, @@ -28,19 +21,9 @@ get_rotation, get_scale, } -#endif #else #ifdef BUFFER_STORAGE -#ifdef PRECOMPUTE_COVARIANCE_3D -#import bevy_gaussian_splatting::planar::{ - get_position, - get_color, - get_visibility, - get_opacity, - get_cov3d, -} -#else #import bevy_gaussian_splatting::planar::{ get_position, get_color, @@ -50,22 +33,11 @@ get_scale, } #endif -#endif #endif #ifdef BUFFER_TEXTURE -#ifdef PRECOMPUTE_COVARIANCE_3D -#import bevy_gaussian_splatting::texture::{ - get_position, - get_color, - get_visibility, - get_opacity, - get_cov3d, - location, -} -#else #import bevy_gaussian_splatting::texture::{ get_position, get_color, @@ -76,7 +48,6 @@ location, } #endif -#endif struct Surfel { @@ -195,3 +166,5 @@ fn surfel_fragment_power( return power; } + +#endif // GAUSSIAN_SURFEL