1// Defines the common arrays used to access bindless resources.2//3// This need to be kept up to date with the `BINDING_NUMBERS` table in4// `bindless.rs`.5//6// You access these by indexing into the bindless index table, and from there7// indexing into the appropriate binding array. For example, to access the base8// color texture of a `StandardMaterial` in bindless mode, write9// `bindless_textures_2d[materials[slot].base_color_texture]`, where10// `materials` is the bindless index table and `slot` is the index into that11// table (which can be found in the `Mesh`).13#define_import_path bevy_render::bindless15#ifdef BINDLESS17// Binding 0 is the bindless index table.18// Filtering samplers.19@group(2) @binding(1) var bindless_samplers_filtering: binding_array<sampler>;20// Non-filtering samplers (nearest neighbor).21@group(2) @binding(2) var bindless_samplers_non_filtering: binding_array<sampler>;22// Comparison samplers (typically for shadow mapping).23@group(2) @binding(3) var bindless_samplers_comparison: binding_array<sampler>;24// 1D textures.25@group(2) @binding(4) var bindless_textures_1d: binding_array<texture_1d<f32>>;26// 2D textures.27@group(2) @binding(5) var bindless_textures_2d: binding_array<texture_2d<f32>>;28// 2D array textures.29@group(2) @binding(6) var bindless_textures_2d_array: binding_array<texture_2d_array<f32>>;30// 3D textures.31@group(2) @binding(7) var bindless_textures_3d: binding_array<texture_3d<f32>>;32// Cubemap textures.33@group(2) @binding(8) var bindless_textures_cube: binding_array<texture_cube<f32>>;34// Cubemap array textures.35@group(2) @binding(9) var bindless_textures_cube_array: binding_array<texture_cube_array<f32>>;37#endif // BINDLESS