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// Shared data transferred between Aqua's terminal material and layered
2// lighting/optics modules. This file contains types only.
4#define_import_path bevy_aqua_core::material
6struct SurfaceVertexOutput {
7 @builtin(position) position: vec4<f32>,
8 @location(0) world_position: vec4<f32>,
9 @location(1) world_normal: vec3<f32>,
10 @location(2) undisplaced_xz: vec2<f32>,
11 @location(3) sample_data: vec3<f32>,
12 @location(4) base_world_position: vec3<f32>,
15struct CameraDepthPath {
16 path_length: f32,
17 screen_uv: vec2<f32>,
18 scene_z: f32,
19 has_background: bool,
22struct CameraDepthDebug {
23 path_length: f32,
24 screen_uv: vec2<f32>,
25 refracted_uv: vec2<f32>,
26 refracted_sample_valid: bool,
27 has_background: bool,
30struct NearSurface {
31 normal: vec3<f32>,
32 lighting_normal: vec3<f32>,
33 lighting_distance: f32,
34 lighting_normal_strength: f32,
35 filtered_detail_variance: f32,
38struct PrimaryLightState {
39 view_z: f32,
40 point_start: u32,
41 spot_start: u32,
42 light_end: u32,
43 shadow: f32,
44 color: vec3<f32>,
45 radiance: vec3<f32>,
48struct MediumState {
49 deep_body_albedo: vec3<f32>,
50 diffuse_irradiance: vec3<f32>,
51 water_depth: f32,
52 foam_density: f32,
55struct FoamState {
56 visible_density: f32,
57 white_density: f32,
58 white_mask: f32,
59 depth_path: CameraDepthPath,
60 has_depth_path: bool,
63struct TransmissionState {
64 body: vec3<f32>,
65 output: vec4<f32>,
66 handled: bool,
69struct BodyLightingState {
70 body: vec3<f32>,
71 foam_ambient: vec3<f32>,
72 fresnel: f32,
73 foam_roughness: f32,
74 environment_roughness: f32,
75 sun_roughness: f32,
78struct LocalLightingState {
79 body: vec3<f32>,
80 reflected: vec3<f32>,
81 foam_radiance: vec3<f32>,
82 foam_normal: vec3<f32>,
Contents