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