Skip to content

Instantly share code, notes, and snippets.

@ikrima
Created May 21, 2015 01:23
Show Gist options
  • Save ikrima/f41aa782d94e96ca556a to your computer and use it in GitHub Desktop.
Save ikrima/f41aa782d94e96ca556a to your computer and use it in GitHub Desktop.
// Spherical Gaussian Power Function float pow(float x, float n)
{
n = n * 1.4427f + 1.4427f; // 1.4427f --> 1/ln(2)
return exp2(x * n - n);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment