incident.wgsl
Import path
Constants
PI
#LUMINANCE_WEIGHTS
#GODOT_NORMAL_FADE_RATE
#GODOT_NORMAL_MINIMUM_STRENGTH
#GODOT_WATER_ALBEDO
#GODOT_SSS_MODIFIER
#Structures
LocalLightContribution
#IncidentDirectionalLight
#Functions
smith_masking_shadowing
#ggx_distribution
#safe_normalize
#sample_local_light
#local_light_contribution
#
fn
local_light_contribution
(
sample:
LocalLightSample
,
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
#view_direction
#sample_environment
#sample_diffuse_environment
#filtered_primary_light_color
#resolve_primary_light
#strongest_incident_directional_light
#
fn
strongest_incident_directional_light
(
,
shadow_normal:
vec3<f32>
,
view_z:
f32
)
->
IncidentDirectionalLight