Support Forum G3D Web Page |
Efficient GPU implementation of the octahedral unit vector encoding from
More...
Public Member Functions | |
vec3 | octDecode (vec2 o) |
Returns a unit vector. More... | |
vec2 | octEncode (in vec3 v) |
Assumes that v is a unit vector. More... | |
Efficient GPU implementation of the octahedral unit vector encoding from
|
inline |
Returns a unit vector.
Argument o is an octahedral vector packed via octEncode, on the [-1, +1] square
|
inline |
Assumes that v is a unit vector.
The result is an octahedral vector on the [-1, +1] square.