view_transformations.wgsl
Import path
bevy_pbr::view_transformations
(click to copy)
Functions
fn
position_view_to_world (view_pos :
vec3<f32> )
->
vec3<f32>
fn
position_clip_to_world (clip_pos :
vec4<f32> )
->
vec3<f32>
fn
position_ndc_to_world (ndc_pos :
vec3<f32> )
->
vec3<f32>
fn
direction_view_to_world (view_dir :
vec3<f32> )
->
vec3<f32>
fn
direction_clip_to_world (clip_dir :
vec4<f32> )
->
vec3<f32>
fn
position_world_to_view (world_pos :
vec3<f32> )
->
vec3<f32>
fn
position_clip_to_view (clip_pos :
vec4<f32> )
->
vec3<f32>
fn
position_ndc_to_view (ndc_pos :
vec3<f32> )
->
vec3<f32>
fn
direction_world_to_view (world_dir :
vec3<f32> )
->
vec3<f32>
fn
direction_clip_to_view (clip_dir :
vec4<f32> )
->
vec3<f32>
fn
position_world_to_clip (world_pos :
vec3<f32> )
->
vec4<f32>
fn
position_view_to_clip (view_pos :
vec3<f32> )
->
vec4<f32>
fn
direction_world_to_clip (world_dir :
vec3<f32> )
->
vec4<f32>
fn
direction_view_to_clip (view_dir :
vec3<f32> )
->
vec4<f32>
fn
position_world_to_ndc (world_pos :
vec3<f32> )
->
vec3<f32>
fn
position_view_to_ndc (view_pos :
vec3<f32> )
->
vec3<f32>
fn
perspective_camera_near ( )
->
f32
fn
depth_ndc_to_view_z (ndc_depth :
f32 )
->
f32
Parameter
Type
ndc_depth
f32
fn
view_z_to_depth_ndc (view_z :
f32 )
->
f32
Parameter
Type
view_z
f32
fn
ndc_to_uv (ndc :
vec2<f32> )
->
vec2<f32>
fn
uv_to_ndc (uv :
vec2<f32> )
->
vec2<f32>
fn
frag_coord_to_uv (frag_coord :
vec2<f32> )
->
vec2<f32>
fn
frag_coord_to_ndc (frag_coord :
vec4<f32> )
->
vec3<f32>
fn
ndc_to_frag_coord (ndc :
vec2<f32> )
->
vec2<f32>