Back home 🏡 WGSL Spec Bevy WGSL Functions

parallax_mapping.wgsl

Import path

Functions

sample_depth_map

#
fn sample_depth_map(uv: vec2<f32>) -> f32
Parameter Type
uv vec2<f32>
Returns: f32

parallaxed_uv

#
An implementation of parallax mapping, see https://en.wikipedia.org/wiki/Parallax_mapping Code derived from: https://web.archive.org/web/20150419215321/http://sunandblackcat.com/tipFullView.php?l=eng&topicid=28
fn parallaxed_uv(depth_scale: f32, max_layer_count: f32, max_steps: u32) -> vec2<f32>
Parameter Type
depth_scale f32
max_layer_count f32
max_steps u32
Returns: vec2<f32>