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::atmosphere::types
3struct Atmosphere {
4 // Radius of the planet
5 bottom_radius: f32, // units: m
7 // Radius at which we consider the atmosphere to 'end' for out calculations (from center of planet)
8 top_radius: f32, // units: m
10 ground_albedo: vec3<f32>,
12 rayleigh_density_exp_scale: f32,
13 rayleigh_scattering: vec3<f32>,
15 mie_density_exp_scale: f32,
16 mie_scattering: f32, // units: m^-1
17 mie_absorption: f32, // units: m^-1
18 mie_asymmetry: f32, // the "asymmetry" value of the phase function, unitless. Domain: (-1, 1)
20 ozone_layer_altitude: f32, // units: m
21 ozone_layer_width: f32, // units: m
22 ozone_absorption: vec3<f32>, // ozone absorption. units: m^-1
25struct AtmosphereSettings {
26 transmittance_lut_size: vec2<u32>,
27 multiscattering_lut_size: vec2<u32>,
28 sky_view_lut_size: vec2<u32>,
29 aerial_view_lut_size: vec3<u32>,
30 transmittance_lut_samples: u32,
31 multiscattering_lut_dirs: u32,
32 multiscattering_lut_samples: u32,
33 sky_view_lut_samples: u32,
34 aerial_view_lut_samples: u32,
35 aerial_view_lut_max_distance: f32,
36 scene_units_to_m: f32,
37 sky_max_samples: u32,
38 rendering_method: u32,
42// "Atmosphere space" is just the view position with y=0 and oriented horizontally,
43// so the horizon stays a horizontal line in our luts
44struct AtmosphereTransforms {
45 world_from_atmosphere: mat4x4<f32>,
Contents