
# Objective - When adding/removing bindings in large binding lists, git would generate very difficult-to-read diffs ## Solution - Move the `@group(X) @binding(Y)` into the same line as the binding type declaration
22 lines
607 B
WebGPU Shading Language
22 lines
607 B
WebGPU Shading Language
#define_import_path bevy_pbr::mesh_bindings
|
|
|
|
#import bevy_pbr::mesh_types Mesh
|
|
|
|
#ifdef MESH_BINDGROUP_1
|
|
|
|
#ifdef PER_OBJECT_BUFFER_BATCH_SIZE
|
|
@group(1) @binding(0) var<uniform> mesh: array<Mesh, #{PER_OBJECT_BUFFER_BATCH_SIZE}u>;
|
|
#else
|
|
@group(1) @binding(0) var<storage> mesh: array<Mesh>;
|
|
#endif // PER_OBJECT_BUFFER_BATCH_SIZE
|
|
|
|
#else // MESH_BINDGROUP_1
|
|
|
|
#ifdef PER_OBJECT_BUFFER_BATCH_SIZE
|
|
@group(2) @binding(0) var<uniform> mesh: array<Mesh, #{PER_OBJECT_BUFFER_BATCH_SIZE}u>;
|
|
#else
|
|
@group(2) @binding(0) var<storage> mesh: array<Mesh>;
|
|
#endif // PER_OBJECT_BUFFER_BATCH_SIZE
|
|
|
|
#endif // MESH_BINDGROUP_1
|