Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Spherical normal encoding
// Encoding:
// Decoding:
normal.z=length2(normalOut.xy)*2- 1;
normal.xy=normalize(normalOut.xy)*sqrt(1- normal.z*normal.z);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.