Merge b6a98a7dda
into 877d278785
This commit is contained in:
commit
601486e29d
@ -55,8 +55,7 @@ fn octahedral_encode(v: vec3<f32>) -> vec2<f32> {
|
|||||||
// For decoding normals or unit direction vectors from octahedral coordinates.
|
// For decoding normals or unit direction vectors from octahedral coordinates.
|
||||||
fn octahedral_decode(v: vec2<f32>) -> vec3<f32> {
|
fn octahedral_decode(v: vec2<f32>) -> vec3<f32> {
|
||||||
let f = v * 2.0 - 1.0;
|
let f = v * 2.0 - 1.0;
|
||||||
var n = octahedral_decode_signed(f);
|
return octahedral_decode_signed(f);
|
||||||
return normalize(n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Like octahedral_decode, but for input in [-1, 1] instead of [0, 1].
|
// Like octahedral_decode, but for input in [-1, 1] instead of [0, 1].
|
||||||
|
Loading…
Reference in New Issue
Block a user