Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions crates/bevy_pbr/src/atmosphere/aerial_view_lut.wgsl
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
#import bevy_pbr::{
mesh_view_types::{Lights, DirectionalLight},
atmosphere::{
types::{Atmosphere, AtmosphereSettings},
bindings::{atmosphere, settings, view, lights, aerial_view_lut_out},
bindings::settings,
functions::{
sample_transmittance_lut, sample_density_lut, rayleigh, henyey_greenstein,
sample_multiscattering_lut, AtmosphereSample, sample_local_inscattering,
uv_to_ndc, max_atmosphere_distance, uv_to_ray_direction,
MIDPOINT_RATIO, get_view_position, MIN_EXTINCTION, ABSORPTION_DENSITY,
SCATTERING_DENSITY,
sample_density_lut, sample_local_inscattering, uv_to_ray_direction, get_view_position,
MIDPOINT_RATIO, MIN_EXTINCTION, ABSORPTION_DENSITY, SCATTERING_DENSITY,
},
}
}
Expand Down
7 changes: 3 additions & 4 deletions crates/bevy_pbr/src/atmosphere/functions.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
types::Atmosphere,
bindings::{
atmosphere, settings, view, lights, transmittance_lut, atmosphere_lut_sampler,
multiscattering_lut, sky_view_lut, aerial_view_lut, atmosphere_transforms,
multiscattering_lut, sky_view_lut, aerial_view_lut, atmosphere_transforms,
medium_density_lut, medium_scattering_lut, medium_sampler,
},
bruneton_functions::{
transmittance_lut_r_mu_to_uv, transmittance_lut_uv_to_r_mu,
ray_intersects_ground, distance_to_top_atmosphere_boundary,
distance_to_bottom_atmosphere_boundary
transmittance_lut_r_mu_to_uv, ray_intersects_ground,
distance_to_top_atmosphere_boundary, distance_to_bottom_atmosphere_boundary
},
}

Expand Down
13 changes: 4 additions & 9 deletions crates/bevy_pbr/src/atmosphere/multiscattering_lut.wgsl
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
#import bevy_pbr::{
mesh_view_types::{Lights, DirectionalLight},
atmosphere::{
types::{Atmosphere, AtmosphereSettings},
bindings::{atmosphere, settings},
functions::{
multiscattering_lut_uv_to_r_mu, sample_transmittance_lut,
get_local_r, get_local_up, sample_density_lut, FRAC_4_PI,
max_atmosphere_distance, rayleigh, henyey_greenstein,
zenith_azimuth_to_ray_dir, MIN_EXTINCTION, ABSORPTION_DENSITY,
SCATTERING_DENSITY,
max_atmosphere_distance,
MIN_EXTINCTION, ABSORPTION_DENSITY, SCATTERING_DENSITY,
},
bruneton_functions::{
distance_to_top_atmosphere_boundary, distance_to_bottom_atmosphere_boundary, ray_intersects_ground
}
bruneton_functions::ray_intersects_ground
}
}

#import bevy_render::maths::{PI,PI_2}
#import bevy_render::maths::{PI, PI_2}

const PHI_2: vec2<f32> = vec2(1.3247179572447460259609088, 1.7548776662466927600495087);

Expand Down
4 changes: 1 addition & 3 deletions crates/bevy_pbr/src/atmosphere/render_sky.wgsl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
enable dual_source_blending;

#import bevy_pbr::atmosphere::{
types::{Atmosphere, AtmosphereSettings},
bindings::{atmosphere, view, atmosphere_transforms, settings},
bindings::{view, settings},
functions::{
sample_transmittance_lut, sample_transmittance_lut_segment,
sample_sky_view_lut, direction_world_to_atmosphere,
Expand All @@ -11,7 +10,6 @@ enable dual_source_blending;
get_view_position, max_atmosphere_distance
},
};
#import bevy_render::view::View;

#import bevy_core_pipeline::fullscreen_vertex_shader::FullscreenVertexOutput

Expand Down
4 changes: 1 addition & 3 deletions crates/bevy_pbr/src/atmosphere/sky_view_lut.wgsl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#import bevy_pbr::{
mesh_view_types::Lights,
atmosphere::{
types::{Atmosphere, AtmosphereSettings},
bindings::{atmosphere, view, settings},
bindings::settings,
functions::{
get_view_position, raymarch_atmosphere,
max_atmosphere_distance, direction_atmosphere_to_world,
Expand Down
11 changes: 6 additions & 5 deletions crates/bevy_pbr/src/atmosphere/transmittance_lut.wgsl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#import bevy_pbr::atmosphere::{
types::{Atmosphere, AtmosphereSettings},
bindings::{settings, atmosphere},
functions::{AtmosphereSample, sample_density_lut, get_local_r, max_atmosphere_distance, MIDPOINT_RATIO, ABSORPTION_DENSITY, SCATTERING_DENSITY},
bruneton_functions::{transmittance_lut_uv_to_r_mu, distance_to_bottom_atmosphere_boundary, distance_to_top_atmosphere_boundary},
bindings::settings,
functions::{
sample_density_lut, get_local_r, max_atmosphere_distance,
MIDPOINT_RATIO, ABSORPTION_DENSITY, SCATTERING_DENSITY
},
bruneton_functions::transmittance_lut_uv_to_r_mu,
}


#import bevy_core_pipeline::fullscreen_vertex_shader::FullscreenVertexOutput

@group(0) @binding(13) var transmittance_lut_out: texture_storage_2d<rgba16float, write>;
Expand Down
Loading