ColorGrading
#
View
#
struct
View
{
lod_view_world_position:
vec3 <
f32 >
,
}
position_view_to_world
#
fn
position_view_to_world
(
,
)
->
vec3 <
f32 >
position_clip_to_world
#
fn
position_clip_to_world
(
,
)
->
vec3 <
f32 >
position_ndc_to_world
#
fn
position_ndc_to_world
(
,
)
->
vec3 <
f32 >
direction_view_to_world
#
fn
direction_view_to_world
(
,
)
->
vec3 <
f32 >
direction_clip_to_world
#
fn
direction_clip_to_world
(
,
)
->
vec3 <
f32 >
position_world_to_view
#
fn
position_world_to_view
(
,
)
->
vec3 <
f32 >
position_clip_to_view
#
fn
position_clip_to_view
(
,
)
->
vec3 <
f32 >
position_ndc_to_view
#
fn
position_ndc_to_view
(
,
)
->
vec3 <
f32 >
direction_world_to_view
#
fn
direction_world_to_view
(
,
)
->
vec3 <
f32 >
direction_clip_to_view
#
fn
direction_clip_to_view
(
,
)
->
vec3 <
f32 >
position_world_to_clip
#
fn
position_world_to_clip
(
,
)
->
vec4 <
f32 >
position_view_to_clip
#
fn
position_view_to_clip
(
,
)
->
vec4 <
f32 >
direction_world_to_clip
#
fn
direction_world_to_clip
(
,
)
->
vec4 <
f32 >
direction_view_to_clip
#
fn
direction_view_to_clip
(
,
)
->
vec4 <
f32 >
position_world_to_ndc
#
fn
position_world_to_ndc
(
,
)
->
vec3 <
f32 >
position_view_to_ndc
#
fn
position_view_to_ndc
(
,
)
->
vec3 <
f32 >
perspective_camera_near
#
fn
perspective_camera_near
(
)
->
f32
depth_ndc_to_view_z
#
fn
depth_ndc_to_view_z
(
,
,
)
->
f32
view_z_to_depth_ndc
#
fn
view_z_to_depth_ndc
(
,
)
->
f32
ndc_to_uv
#
uv_to_ndc
#
frag_coord_to_uv
#
fn
frag_coord_to_uv
(
,
)
->
vec2 <
f32 >
frag_coord_to_ndc
#
fn
frag_coord_to_ndc
(
,
)
->
vec3 <
f32 >
ndc_to_frag_coord
#
fn
ndc_to_frag_coord
(
,
)
->
vec2 <
f32 >
Contents
Convert a view space position to world space