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.

Constants

PI

#
const PI: f32 = 3.14159265359

LUMINANCE_WEIGHTS

#
const LUMINANCE_WEIGHTS: vec3<f32> = vec3(0.2126, 0.7152, 0.0722)

GODOT_NORMAL_FADE_RATE

#
const GODOT_NORMAL_FADE_RATE: f32 = 0.0175

GODOT_NORMAL_MINIMUM_STRENGTH

#
const GODOT_NORMAL_MINIMUM_STRENGTH: f32 = 0.015

GODOT_WATER_ALBEDO

#
const GODOT_WATER_ALBEDO: vec3<f32> = vec3( 0.010022826, 0.01960665, 0.02721178, )

GODOT_SSS_MODIFIER

#
const GODOT_SSS_MODIFIER: vec3<f32> = vec3(0.9, 1.15, 0.85)

Structures

LocalLightContribution

#
struct LocalLightContribution {
body: vec3<f32>,
reflection: vec3<f32>,
}

IncidentDirectionalLight

#
struct IncidentDirectionalLight {
valid: bool,
direction: vec3<f32>,
color: vec3<f32>,
shadow: f32,
}

Functions

smith_masking_shadowing

#
fn smith_masking_shadowing (
cos_theta: f32,
alpha: f32
) -> f32

ggx_distribution

#
fn ggx_distribution (
cos_theta: f32,
alpha: f32
) -> f32

safe_normalize

#
fn safe_normalize (
value: vec3<f32>,
fallback: vec3<f32>
) -> vec3<f32>

sample_local_light

#
Used by 1 shader in bevy-aqua-core 0.1.3
fn sample_local_light (
light_id: u32,
is_spot: bool,
world_position: vec3<f32>,
surface_normal: vec3<f32>,
frag_coord: vec2<f32>
) -> LocalLightSample

local_light_contribution

#
Used by 1 shader in bevy-aqua-core 0.1.3
fn local_light_contribution (
lighting_normal: vec3<f32>,
to_view: vec3<f32>,
wave_height: f32,
sun_roughness: f32,
grazing: f32,
crest_transmission: f32,
sss_enabled: bool
) -> LocalLightContribution

quat_rotate

#
fn quat_rotate (
rotation: vec4<f32>,
value: vec3<f32>
) -> vec3<f32>

view_direction

#
Used by 1 shader in bevy-aqua-core 0.1.3
fn view_direction (
world_position: vec3<f32>
) -> vec3<f32>

sample_environment

#
fn sample_environment (
reflection: vec3<f32>,
surface_normal: vec3<f32>,
perceptual_roughness: f32
) -> vec3<f32>

sample_diffuse_environment

#
fn sample_diffuse_environment (
surface_normal: vec3<f32>
) -> vec3<f32>

filtered_primary_light_color

#
fn filtered_primary_light_color (
world_position: vec4<f32>,
direction_to_light: vec3<f32>,
sun_disk_angular_size: f32,
raw_color: vec3<f32>
) -> vec3<f32>

resolve_primary_light

#
Used by 1 shader in bevy-aqua-core 0.1.3
fn resolve_primary_light (
normal: vec3<f32>
) -> PrimaryLightState

strongest_incident_directional_light

#
fn strongest_incident_directional_light (
shadow_normal: vec3<f32>,
view_z: f32
) -> IncidentDirectionalLight
Contents