@@ -133,12 +133,12 @@ impl Deref for BindGroup {
133133/// In WGSL shaders, the binding would look like this:
134134///
135135/// ```wgsl
136- /// @group(3 ) @binding(0) var<uniform> color: vec4<f32>;
137- /// @group(3 ) @binding(1) var color_texture: texture_2d<f32>;
138- /// @group(3 ) @binding(2) var color_sampler: sampler;
139- /// @group(3 ) @binding(3) var<storage> storage_buffer: array<f32>;
140- /// @group(3 ) @binding(4) var<storage> raw_buffer: array<f32>;
141- /// @group(3 ) @binding(5) var storage_texture: texture_storage_2d<rgba8unorm, read_write>;
136+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(0) var<uniform> color: vec4<f32>;
137+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(1) var color_texture: texture_2d<f32>;
138+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(2) var color_sampler: sampler;
139+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(3) var<storage> storage_buffer: array<f32>;
140+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(4) var<storage> raw_buffer: array<f32>;
141+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(5) var storage_texture: texture_storage_2d<rgba8unorm, read_write>;
142142/// ```
143143/// Note that the "group" index is determined by the usage context. It is not defined in [`AsBindGroup`]. For example, in Bevy material bind groups
144144/// are generally bound to group 2.
@@ -261,7 +261,7 @@ impl Deref for BindGroup {
261261/// roughness: f32,
262262/// };
263263///
264- /// @group(3 ) @binding(0) var<uniform> material: CoolMaterial;
264+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(0) var<uniform> material: CoolMaterial;
265265/// ```
266266///
267267/// Some less common scenarios will require "struct-level" attributes. These are the currently supported struct-level attributes:
@@ -312,7 +312,7 @@ impl Deref for BindGroup {
312312/// declaration:
313313///
314314/// ```wgsl
315- /// @group(3 ) @binding(10) var<storage> material_array: binding_array<StandardMaterial>;
315+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(10) var<storage> material_array: binding_array<StandardMaterial>;
316316/// ```
317317///
318318/// On the other hand, if you write this declaration:
@@ -325,7 +325,7 @@ impl Deref for BindGroup {
325325/// Then Bevy produces a binding that matches this WGSL declaration instead:
326326///
327327/// ```wgsl
328- /// @group(3 ) @binding(10) var<storage> material_array: array<StandardMaterial>;
328+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(10) var<storage> material_array: array<StandardMaterial>;
329329/// ```
330330///
331331/// * Just as with the structure-level `uniform` attribute, Bevy converts the
@@ -338,7 +338,7 @@ impl Deref for BindGroup {
338338/// this in WGSL in non-bindless mode:
339339///
340340/// ```wgsl
341- /// @group(3 ) @binding(0) var<uniform> material: StandardMaterial;
341+ /// @group(#{MATERIAL_BIND_GROUP} ) @binding(0) var<uniform> material: StandardMaterial;
342342/// ```
343343///
344344/// * For efficiency reasons, `data` is generally preferred over `uniform`
0 commit comments