RE: https://mastodon.gamedev.place/@eniko/115809045238976807 ok i got one to wor...
Eniko Fox @eniko@mastodon.gamedev.place
RE: https://mastodon.gamedev.place/@eniko/115809045238976807
ok i got one to work and in the process of getting rid of unnecessarily expensive math operations (atan2 and asin) i accidentally seem to have come up with an almost exact replica of asin for the range 0 to 1 >_>
https://www.desmos.com/calculator/xxovxrssyc
float approxAsin(float x) {
// c is from circle ease formula sqrt(1-x*x)
float c = 1.0 - sqrt(1.0 - x * x);
return lerp(x, PI/2, c * c);
}
and now you gpu wizards get to tell me whether this will actually be faster than just using asin or not! :D