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_pbr::mesh_view_bindings
3#import bevy_pbr::mesh_view_types as types
4#import bevy_render::{
5 view::View,
6 globals::Globals,
7}
9@group(0) @binding(0) var<uniform> view: View;
10@group(0) @binding(1) var<uniform> lights: types::Lights;
11#ifdef NO_CUBE_ARRAY_TEXTURES_SUPPORT
12@group(0) @binding(2) var point_shadow_textures: texture_depth_cube;
13#else
14@group(0) @binding(2) var point_shadow_textures: texture_depth_cube_array;
15#endif
16@group(0) @binding(3) var point_shadow_textures_comparison_sampler: sampler_comparison;
17#ifdef PCSS_SAMPLERS_AVAILABLE
18@group(0) @binding(4) var point_shadow_textures_linear_sampler: sampler;
19#endif // PCSS_SAMPLERS_AVAILABLE
20#ifdef NO_ARRAY_TEXTURES_SUPPORT
21@group(0) @binding(5) var directional_shadow_textures: texture_depth_2d;
22#else
23@group(0) @binding(5) var directional_shadow_textures: texture_depth_2d_array;
24#endif
25@group(0) @binding(6) var directional_shadow_textures_comparison_sampler: sampler_comparison;
26#ifdef PCSS_SAMPLERS_AVAILABLE
27@group(0) @binding(7) var directional_shadow_textures_linear_sampler: sampler;
28#endif // PCSS_SAMPLERS_AVAILABLE
30#if AVAILABLE_STORAGE_BUFFER_BINDINGS >= 3
31@group(0) @binding(8) var<storage> clusterable_objects: types::ClusterableObjects;
32@group(0) @binding(9) var<storage> clusterable_object_index_lists: types::ClusterLightIndexLists;
33@group(0) @binding(10) var<storage> cluster_offsets_and_counts: types::ClusterOffsetsAndCounts;
34#else
35@group(0) @binding(8) var<uniform> clusterable_objects: types::ClusterableObjects;
36@group(0) @binding(9) var<uniform> clusterable_object_index_lists: types::ClusterLightIndexLists;
37@group(0) @binding(10) var<uniform> cluster_offsets_and_counts: types::ClusterOffsetsAndCounts;
38#endif
40@group(0) @binding(11) var<uniform> globals: Globals;
41@group(0) @binding(12) var<uniform> fog: types::Fog;
42@group(0) @binding(13) var<uniform> light_probes: types::LightProbes;
44const VISIBILITY_RANGE_UNIFORM_BUFFER_SIZE: u32 = 64u;
45#if AVAILABLE_STORAGE_BUFFER_BINDINGS >= 6
46@group(0) @binding(14) var<storage> visibility_ranges: array<vec4<f32>>;
47#else
48@group(0) @binding(14) var<uniform> visibility_ranges: array<vec4<f32>, VISIBILITY_RANGE_UNIFORM_BUFFER_SIZE>;
49#endif
51@group(0) @binding(15) var<uniform> ssr_settings: types::ScreenSpaceReflectionsSettings;
52@group(0) @binding(16) var screen_space_ambient_occlusion_texture: texture_2d<f32>;
54#ifdef MULTIPLE_LIGHT_PROBES_IN_ARRAY
55@group(0) @binding(17) var diffuse_environment_maps: binding_array<texture_cube<f32>, 8u>;
56@group(0) @binding(18) var specular_environment_maps: binding_array<texture_cube<f32>, 8u>;
57#else
58@group(0) @binding(17) var diffuse_environment_map: texture_cube<f32>;
59@group(0) @binding(18) var specular_environment_map: texture_cube<f32>;
60#endif
61@group(0) @binding(19) var environment_map_sampler: sampler;
62@group(0) @binding(20) var<uniform> environment_map_uniform: types::EnvironmentMapUniform;
64#ifdef IRRADIANCE_VOLUMES_ARE_USABLE
65#ifdef MULTIPLE_LIGHT_PROBES_IN_ARRAY
66@group(0) @binding(21) var irradiance_volumes: binding_array<texture_3d<f32>, 8u>;
67#else
68@group(0) @binding(21) var irradiance_volume: texture_3d<f32>;
69#endif
70@group(0) @binding(22) var irradiance_volume_sampler: sampler;
71#endif
73#ifdef CLUSTERED_DECALS_ARE_USABLE
74@group(0) @binding(23) var<storage> clustered_decals: types::ClusteredDecals;
75@group(0) @binding(24) var clustered_decal_textures: binding_array<texture_2d<f32>, 8u>;
76@group(0) @binding(25) var clustered_decal_sampler: sampler;
77#endif // CLUSTERED_DECALS_ARE_USABLE
79// NB: If you change these, make sure to update `tonemapping_shared.wgsl` too.
80@group(0) @binding(26) var dt_lut_texture: texture_3d<f32>;
81@group(0) @binding(27) var dt_lut_sampler: sampler;
83#ifdef MULTISAMPLED
84#ifdef DEPTH_PREPASS
85@group(0) @binding(28) var depth_prepass_texture: texture_depth_multisampled_2d;
86#endif // DEPTH_PREPASS
87#ifdef NORMAL_PREPASS
88@group(0) @binding(29) var normal_prepass_texture: texture_multisampled_2d<f32>;
89#endif // NORMAL_PREPASS
90#ifdef MOTION_VECTOR_PREPASS
91@group(0) @binding(30) var motion_vector_prepass_texture: texture_multisampled_2d<f32>;
92#endif // MOTION_VECTOR_PREPASS
94#else // MULTISAMPLED
96#ifdef DEPTH_PREPASS
97@group(0) @binding(28) var depth_prepass_texture: texture_depth_2d;
98#endif // DEPTH_PREPASS
99#ifdef NORMAL_PREPASS
100@group(0) @binding(29) var normal_prepass_texture: texture_2d<f32>;
101#endif // NORMAL_PREPASS
102#ifdef MOTION_VECTOR_PREPASS
103@group(0) @binding(30) var motion_vector_prepass_texture: texture_2d<f32>;
104#endif // MOTION_VECTOR_PREPASS
106#endif // MULTISAMPLED
108#ifdef DEFERRED_PREPASS
109@group(0) @binding(31) var deferred_prepass_texture: texture_2d<u32>;
110#endif // DEFERRED_PREPASS
112@group(0) @binding(32) var view_transmission_texture: texture_2d<f32>;
113@group(0) @binding(33) var view_transmission_sampler: sampler;
115#ifdef OIT_ENABLED
116@group(0) @binding(34) var<storage, read_write> oit_layers: array<vec2<u32>>;
117@group(0) @binding(35) var<storage, read_write> oit_layer_ids: array<atomic<i32>>;
118@group(0) @binding(36) var<uniform> oit_settings: types::OrderIndependentTransparencySettings;
119#endif // OIT_ENABLED
Contents