Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.
1#define_import_path bevy_gaussian_splatting::bindings
3#import bevy_render::globals::Globals
4#import bevy_render::view::View
7@group(0) @binding(0) var<uniform> view: View;
8@group(0) @binding(1) var<uniform> globals: Globals;
10struct GaussianUniforms {
11 transform: mat4x4<f32>,
12 global_opacity: f32,
13 global_scale: f32,
14 count: u32,
15 count_root_ceil: u32,
16};
17@group(1) @binding(0) var<uniform> gaussian_uniforms: GaussianUniforms;
20#ifdef PACKED_F32
21struct Gaussian {
22 @location(0) rotation: vec4<f32>,
23 @location(1) position_visibility: vec4<f32>,
24 @location(2) scale_opacity: vec4<f32>,
25 sh: array<f32, #{SH_COEFF_COUNT}>,
26};
28#ifdef READ_WRITE_POINTS
29@group(2) @binding(0) var<storage, read_write> points: array<Gaussian>;
30#else
31@group(2) @binding(0) var<storage, read> points: array<Gaussian>;
32#endif
33#endif
36#ifdef PLANAR_F32
37#ifdef READ_WRITE_POINTS
38@group(2) @binding(0) var<storage, read_write> position_visibility: array<vec4<f32>>;
39#else
40@group(2) @binding(0) var<storage, read> position_visibility: array<vec4<f32>>;
41#endif
43@group(2) @binding(1) var<storage, read> spherical_harmonics: array<array<f32, #{SH_COEFF_COUNT}>>;
45#ifdef PRECOMPUTE_COVARIANCE_3D
46@group(2) @binding(2) var<storage, read> covariance_3d_opacity: array<array<f32, 8>>;
47#else
48@group(2) @binding(2) var<storage, read> rotation: array<vec4<f32>>;
49@group(2) @binding(3) var<storage, read> scale_opacity: array<vec4<f32>>;
50#endif
51#endif
54#ifdef PLANAR_F16
55#ifdef READ_WRITE_POINTS
56@group(2) @binding(0) var<storage, read_write> position_visibility: array<vec4<f32>>;
57#else
58@group(2) @binding(0) var<storage, read> position_visibility: array<vec4<f32>>;
59#endif
60@group(2) @binding(1) var<storage, read> spherical_harmonics: array<array<u32, #{HALF_SH_COEFF_COUNT}>>;
62#ifdef PRECOMPUTE_COVARIANCE_3D
63@group(2) @binding(2) var<storage, read> covariance_3d_opacity: array<vec4<u32>>;
64#else
65@group(2) @binding(2) var<storage, read> rotation_scale_opacity: array<vec4<u32>>;
66#endif
67#endif
70#ifdef PLANAR_TEXTURE_F16
71@group(2) @binding(0) var position_visibility: texture_2d<f32>;
73#if SH_VEC4_PLANES == 1
74@group(2) @binding(1) var spherical_harmonics: texture_2d<u32>;
75#else
76@group(2) @binding(1) var spherical_harmonics: texture_2d_array<u32>;
77#endif
79#ifdef PRECOMPUTE_COVARIANCE_3D
80@group(2) @binding(2) var covariance_3d_opacity: texture_2d<u32>;
81#else
82@group(2) @binding(2) var rotation_scale_opacity: texture_2d<u32>;
83#endif
84#endif
87#ifdef PLANAR_TEXTURE_F32
88@group(2) @binding(0) var position_visibility: texture_2d<f32>;
90#if SH_VEC4_PLANES == 1
91@group(2) @binding(1) var spherical_harmonics: texture_2d<f32>;
92#else
93@group(2) @binding(1) var spherical_harmonics: texture_2d_array<f32>;
94#endif
96// TODO: support f32_cov3d_opacity texture
98@group(2) @binding(2) var rotation_scale_opacity: texture_2d<f32>;
99#endif
102struct DrawIndirect {
103 vertex_count: u32,
104 instance_count: atomic<u32>,
105 base_vertex: u32,
106 base_instance: u32,
109struct Entry {
110 key: u32,
111 value: u32,
Contents