Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

deform.wgsl

Import path

Structures

DeformationResult

#

The full current-frame result is intentionally independent of a render-stage output. sample_xz is the stable location used to evaluate deformation; undisplaced_xz preserves the forward material’s existing varying contract.

struct DeformationResult {
world_position: vec4<f32> ,
base_world_position: vec3<f32> ,
world_normal: vec3<f32> ,
sample_xz: vec2<f32> ,
undisplaced_xz: vec2<f32> ,
lod: u32 ,
sample_alpha: f32 ,
displacement: vec3<f32> ,
wave_height: f32 ,
body_slot: u32 ,
body_params: BodyParams ,
body_level: f32 ,
bounded: bool ,
river: bool ,
river_flow: vec4<f32> ,
}

Functions

deformation_safe_normalize

#
fn deformation_safe_normalize (
fallback: vec3<f32>
) -> vec3<f32>

deform_current

#
fn deform_current (
vertex: Vertex
time: f32
) -> DeformationResult