Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.

Functions

decompress_vertex_position

#
fn decompress_vertex_position (
compressed_position: vec4<f32>
, 
aabb_center: vec3<f32>
, 
aabb_half_extents: vec3<f32>
) -> vec3<f32>

decompress_vertex_normal

#
fn decompress_vertex_normal (
compressed_normal: vec2<f32>
) -> vec3<f32>

decompress_vertex_tangent

#
fn decompress_vertex_tangent (
compressed_tangent: vec2<f32>
) -> vec4<f32>

decompress_vertex_uv

#
fn decompress_vertex_uv (
compressed_uv: vec2<f32>
, 
uv_min_and_extents: vec4<f32>
) -> vec2<f32>

octahedral_decode_signed

#

For decoding normals or unit direction vectors from octahedral coordinates. Input is [-1, 1].

fn octahedral_decode_signed (
v: vec2<f32>
) -> vec3<f32>

octahedral_decode_tangent

#

Decode tangent vectors from octahedral coordinates and return the sign. Input is [-1, 1]. The y component should have been mapped to always be positive and then encoded the sign.

fn octahedral_decode_tangent (
v: vec2<f32>
) -> vec4<f32>

octahedral_encode

#

https://jcgt.org/published/0003/02/01/paper.pdf For encoding normals or unit direction vectors as octahedral coordinates.

fn octahedral_encode (
v: vec3<f32>
) -> vec2<f32>

octahedral_decode

#

For decoding normals or unit direction vectors from octahedral coordinates.

fn octahedral_decode (
v: vec2<f32>
) -> vec3<f32>
Contents